This is an old revision of the document!


Contact Unsubscribe Webhook

When a Contact unsubscribes, you can have Sentori pass this information on to an external system, such as your CRM system, to keep everything in sync.

To use this feature, set the Contact Unsubscribe Webhook for your account by signing in to Sentori then going to the Settings menu and choosing API.

Request

This is how Sentori structures its request to your external system when a Contact unsubscribes:

HTTP Method: POST

HEADERS

Content-Typeapplication/json

BODY

AccountExternalIDThe External ID of the Account the Contact has unsubscribed from.
EmailAddressThe email address of the Contact that has unsubscribed.
TypeThe string “unsubscribe”.
vhashA hashed value used to confirm it's a genuine notification from Sentori.

Confirm the Request is Genuine

To confirm the request isn't from another system impersonating Sentori, perform the following operation.

  1. Concatenate the AccountExternalID, EmailAddress, Type values from the request and your API Key
  2. Convert the result into bytes
  3. Get the SHA1 hash of those bytes and remove any hyphen characters

If the result matches the “vhash” value in the request, it's genuine.

Example Request from Sentori

POST [your webhook url] HTTP/1.1
Content-Type: application/json
User-Agent: Sentori API
Content-Length: 165

{
    "AccountExternalID":"1234ABCD",
    "EmailAddress":"user@example.com",
    "Type":"unsubscribe",
    "vhash":"49D0648E0A7A1C25E94405575B03BA3625A969589"
}