Webhook Responses - Email Campaigns & Contacts

What is a webhook?

A webhook is a call made to a URL when an event occurs. Events could be a hardbounce, opening of an email, deletion of a contact etc.

When an event or status change occurs, an HTTP POST request is sent to the given URL in real time. This POST call contains information about the event.

Webhook Responses

Responses are sent in JSON format and are passed with POST to the URL provided.

Below are the various webhook events along with the expected responses.

Note 

ts, ts_sent, ts_event UTC Timezone
date_sent, date_event Local Timezone
date CET/CEST Timezone

Marked as Spam

LABEL TYPE DESCRIPTION
event string "spam"
email string recipient email
id integer internal id of webhook
date_sent string date the campaign was sent (year-month-day, hour:minute:second)
date_event string date the event occurred (year-month-day, hour:minute:second)
ts_sent integer timestamp in seconds of when campaign was sent
ts_event integer timestamp in seconds of when event occurred
camp_id integer internal id of campaign
campaign name string internal name of campaign
reason string spam reason
ts integer timestamp in seconds of when the webhook was generated
tag string internal tag of campaign

Sample Response

{"id":139911,"camp_id":253,"email":"abc@example.com","campaign name":"Campaign ABC","date_sent":"2019-07-30 08:00:51","date_event":"2019-07-30 08:00:51","event":"spam","tag":"abc","reason":"lorem ipsum","ts_sent":1564466451,"ts_event":1564466451,"ts":1564466452}

Opened

LABEL TYPE DESCRIPTION
event string "opened"
email string recipient email
id integer internal id of webhook
date_sent string date the campaign was sent (year-month-day, hour:minute:second)
date_event string date the event occurred (year-month-day, hour:minute:second)
ts_sent integer timestamp in seconds of when campaign was sent
ts_event integer timestamp in seconds of when event occurred
camp_id integer internal id of campaign
campaign name string internal name of campaign
tag string internal tag of campaign
ts integer timestamp in seconds of when the webhook was generated

Sample Response

{"id":139911,"camp_id":253,"email":"abc@example.com","campaign name":"Campaign ABC","date_sent":"2019-07-30 11:30:50","date_event":"2019-07-30 11:39:15","event":"opened","tag":"abc","ts_sent":1564479050,"ts_event":1564479555,"ts":1564466956} 

Clicked

LABEL TYPE DESCRIPTION
event string "clicked"
email string recipient email
id integer internal id of webhook
date_sent string date the campaign was sent (year-month-day, hour:minute:second) (Local Timezone)
date_event string date the event occurred (year-month-day, hour:minute:second)
ts_sent integer timestamp in seconds of when campaign was sent
ts_event integer timestamp in seconds of when event occurred
camp_id integer internal id of campaign
campaign name string internal name of campaign
tag string internal tag of campaign
ts integer timestamp in seconds of when the webhook was generated
URL string url clicked

Sample Response

{"id":139911,"camp_id":253,"email":"abc@example.com","campaign name":"Campaign ABC","date_sent":"2019-07-30 11:30:50","date_event":"2019-07-30 11:39:15","event":"clicked","tag":"abc","ts_sent":1564479050,"ts_event":1564479555,"URL":"https://example.com","ts":1564466956} 

Hard Bounced

LABEL TYPE DESCRIPTION
event string "hard_bounce"
email string recipient email
id integer internal id of webhook
date_sent string date the campaign was sent (year-month-day, hour:minute:second)
date_event string date the event occurred (year-month-day, hour:minute:second)
ts_sent integer timestamp in seconds of when campaign was sent
ts_event integer timestamp in seconds of when event occurred
camp_id integer internal id of campaign
campaign name string internal name of campaign
sending_ip string ip used to send message
reason string hardbounce reason
ts integer timestamp in seconds of when the webhook was generated
tag string internal tag of campaign

Sample Response

{"id":139911,"camp_id":253,"email":"abc@example.com","campaign name":"Campaign ABC","date_sent":"2019-07-30 08:00:51","date_event":"2019-07-30 08:00:51","event":"hard_bounce","tag":"abc","reason":"lorem ipsum","ts_sent":1564466451,"ts_event":1564466451,"sending_ip":"111.11.11.1","ts":1564466452} 

Soft Bounced

LABEL TYPE DESCRIPTION
event string "soft_bounce"
email string recipient email
id integer internal id of webhook
date_sent string date the campaign was sent (year-month-day, hour:minute:second)
date_event string date the event occurred (year-month-day, hour:minute:second)
ts_sent integer timestamp in seconds of when campaign was sent
ts_event integer timestamp in seconds of when event occurred
camp_id integer internal id of campaign
campaign name string internal name of campaign
reason string softbounce reason
sending_ip string ip used to send message
ts integer timestamp in seconds of when the webhook was generated
tag string internal tag of campaign

Sample Response

{"id":139911,"camp_id":253,"email":"abc@example.com","campaign name":"Campaign ABC","date_sent":"2019-07-30 08:00:51","date_event":"2019-07-30 08:00:51","event":"soft_bounce","tag":"abc","reason":"lorem ipsum","ts_sent":1564466451,"ts_event":1564466451,"sending_ip":"111.11.11.1","ts":1564466452}

Delivered

LABEL TYPE DESCRIPTION
event string "delivered"
email string recipient email
id integer internal id of webhook
date_sent string date the campaign was sent (year-month-day, hour:minute:second)
date_event string date the event occurred (year-month-day, hour:minute:second)
ts_sent integer timestamp in seconds of when campaign was sent
ts_event integer timestamp in seconds of when event occurred
sending_ip string ip used to send message
camp_id integer internal id of campaign
campaign name string internal name of campaign
ts integer timestamp in seconds of when the webhook was generated
tag string internal tag of campaign

Sample Response

{"id":139911,"camp_id":253,"email":"abc@example.com","campaign name":"Campaign ABC","date_sent":"2019-07-30 08:00:51","date_event":"2019-07-30 08:00:51","event":"delivered","tag":"abc","ts_sent":1564466451,"ts_event":1564466451,"sending_ip":"111.11.11.1","ts":1564466452}

Unsubscribed

LABEL TYPE DESCRIPTION
event string "unsubscribe"
email string recipient email
id integer internal id of webhook
date_sent string date the campaign was sent (year-month-day, hour:minute:second)
date_event string date the event occurred (year-month-day, hour:minute:second)
ts_sent integer timestamp in seconds of when campaign was sent
ts_event integer timestamp in seconds of when event occurred
camp_id integer internal id of campaign
campaign name string internal name of campaign
list_id array of integers the internal list id's the recipient has been unsubscribed from
ts integer timestamp in seconds of when the webhook was generated
tag string internal tag of campaign

Sample Response

{"id":139911,"camp_id":253,"email":"abc@example.com","campaign name":"Campaign ABC","date_sent":"2019-07-30 11:30:50","date_event":"2019-07-30 11:39:15","event":"unsubscribe","tag":"abc","list_id":[63,61],"ts_sent":1564479050,"ts_event":1564479555,"ts":1564466956} 

Contact added to a list

LABEL TYPE DESCRIPTION
event string "list_addition"
email string email address of added recipient
id integer internal id of webhook
key string internal key
list_id array of integers the internal list id's the recipient has been added to
date string date the event occurred (year-month-day, hour:minute:second) 
ts integer timestamp in seconds of when the webhook was generated

Sample Response

{"id":139911,"email":"lu.sykora@demo.domain","event":"list_addition","key":"fsn920nfsv6h0gfkkqrb5","list_id":[63,61],"date":"2019-07-30 08:48:11","ts":1564469292}

Contact updated

LABEL TYPE DESCRIPTION
event string "contact_updated"
email string email address of added recipient
id integer internal id of webhook
key string internal key
date string date the event occurred (year-month-day, hour:minute:second) 
ts integer timestamp in seconds of when the webhook was generated
content array of strings full contact information with updates

Sample Response

{"id":139911,"event":"contact_updated","key":"fsn920nfsv6h0gfkkqrb5","date":"2019-07-30 08:52:02","ts":1564469523,"content":[{"email":"lu.sykora@demo.domain","attributes":{"FIRSTNAME":"Luke","LASTNAME":"Sykora","SMS":"30764261246","SHOPIFY_LAST_30_DAYS_CA":0,"SHOPIFY_ORDER_TOTAL":0,"SHOPIFY_CA_USER":0}}]}

Contact deleted

LABEL TYPE DESCRIPTION
event string "contact_deleted"
email string email address of removed recipient
id integer internal id of webhook
key string internal key
date string date the event occurred (year-month-day, hour:minute:second)
ts integer timestamp in seconds of when the webhook was generated

Sample Response

{"id":139911,"email":["lu.sykora@demo.domain"],"event":"contact_deleted","key":"fsn920nfsv6h0gfkkqrb5","date":"2019-07-30 08:53:17","ts":1564469598}