Webhooks

The webhooks enables receiving of real-time feedback of email events such as: opened, clicked, bounced, marked as spam, unsubscribed, blocked. 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 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

Table Of Contents