Webhooks

The webhooks enables receiving of real-time feedback of email events such as: sent, opened, clicked, bounced, marked as spam, unsubscribed, blocked, recipient delete, recipient profile update. This is done by defining an url on your domain that will be called on each email event.

Events

On email event a request will be made to your webhook url.

On sent event

Request:

POST http://yourdomain.com/hook
Content-Type: application/x-www-form-urlencoded

event=sent&
timestamp=1366278365&
email=recipient_email@somedomain.com&
campaign_id=123&
campaign_name=x-sendmachine-campaign

On open event

Request:

POST http://yourdomain.com/hook
Content-Type: application/x-www-form-urlencoded

event=open&
timestamp=1366278365&
email=recipient_email@somedomain.com&
campaign_id=123&
campaign_name=x-sendmachine-campaign

On click event

Request:

POST http://yourdomain.com/hook
Content-Type: application/x-www-form-urlencoded

event=click&
timestamp=1366278365&
email=recipient_email@somedomain.com&
campaign_id=123&
campaign_name=x-sendmachine-campaign&
url=clicked_url

On bounce event

Request:

POST http://yourdomain.com/hook
Content-Type: application/x-www-form-urlencoded

event=bounce&
timestamp=1366278365&
email=recipient_email@somedomain.com&
campaign_id=123&
campaign_name=x-sendmachine-campaign&
hard_bounce=true

On spam event

Request:

POST http://yourdomain.com/hook
Content-Type: application/x-www-form-urlencoded

event=spam&
timestamp=1366278365&
email=recipient_email@somedomain.com&
campaign_id=123&
campaign_name=x-sendmachine-campaign&
cfl=provider

On unsubscribe event

Request:

POST http://yourdomain.com/hook
Content-Type: application/x-www-form-urlencoded

event=unsub&
timestamp=1366278365&
email=recipient_email@somedomain.com&
campaign_id=123&
list_id=5&
campaign_name=x-sendmachine-campaign

On block event

Request:

POST http://yourdomain.com/hook
Content-Type: application/x-www-form-urlencoded

event=block&
timestamp=1366278365&
email=recipient_email@somedomain.com&
campaign_id=123&
campaign_name=x-sendmachine-campaign

On recipient delete event

Request:

POST http://yourdomain.com/hook
Content-Type: application/x-www-form-urlencoded

event=recipient_delete&
timestamp=1366278365&
email=recipient_email@somedomain.com

On recipient profile update event

Request:

POST http://yourdomain.com/hook
Content-Type: application/x-www-form-urlencoded

event=recipient_profile_update&
timestamp=1366278365&
email=recipient_email@somedomain.com
contactlist_hash=BD2F152D