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 do this, you must 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's webhook when a Contact unsubscribes:

HTTP MethodPOST

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(“-”, “”)

Request

POST [webhook url]

HEADERS Content-Type: application/json

BODY {

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

}

https://api.sentoriapp.com/v2.0/contact/add/joe%40example.sentoriapp.com/
Method POST