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.

To confirm the notification is genuine, not from another system impersonating Sentori, perform the following operation. If the result matches the “vhash” value, it's genuine.

SHA1Hashed( GetBytes( AccountExternalID + EmailAddress + Type + API Key ) ).Replace(“-”, “”)

Example Request

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

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