Webhooks

Use Webhooks to send email delivery and User engagement data in real-time to other applications.

Webhooks need to be enabled within account settings and the functionality can be further customised at an Email Profile level.

Data for each of the types of activity below can be sent to separate endpoints. Click on each item below to reveal the specifications of requests and the related data.

Multiple processes make Webhook requests in batches approximately every 15 seconds. Each data packet records one transaction. For example, 400 clicks could be sent in one data packet to the Webhook URL endpoint and that would record 1 Transaction.

Requests made to Webhook URL endpoints expect a HTTP 200 response code and when that doesn't happen, or the requests timeout, the data within that packet will be marked as failed and ignored.

Testing Webhooks

Try Beeceptor to simplify your Webhook testing.

Securing Webhooks

Both HTTPS and HTTP are supported and we recommend that in order to increase security only SSL enabled URLs are used.

Always keep your Webhook URLs private and another approach to take in order to increase security is to include a secret key as part of the URL parameters and then check that on all incoming requests and reject where it does not match.

User Created/Updated

This action cannot be overridden within an Email Profile and will always be triggered for Preference Centre updates.

Data packet is sent in the following structure via HTTP POST in the raw body as JSON approximately every 15 seconds. Optional contacts data fields that are provided will be added to the packet and sent. Empty fields will not be included.

[
    {
        "user_id":"12345",
        "email_address":"some@one.com",
        "reference_code":"", [OPTIONAL]
        "title":"", [OPTIONAL]
        "first_name":"", [OPTIONAL]
        "last_name":"", [OPTIONAL]
        "company_name":"", [OPTIONAL]
        "address_line_1":"", [OPTIONAL]
        "address_line_2":"", [OPTIONAL]
        "address_line_3":"", [OPTIONAL]
        "address_line_4":"", [OPTIONAL]
        "city":"", [OPTIONAL]
        "post_code":"", [OPTIONAL]
        "country":"", [OPTIONAL]
        "telephone":"", [OPTIONAL]
        "mobile":"", [OPTIONAL]
        "gender":"", [OPTIONAL]
        "dob":"", [OPTIONAL]
        "edit_user_tags":"", [OPTIONAL]
        "custom_field_1":"", [OPTIONAL]
        "custom_field_2":"", [OPTIONAL]
        "custom_field_3":"", [OPTIONAL]
        "custom_field_4":"", [OPTIONAL]
        "custom_field_5":"", [OPTIONAL]
        "custom_field_6":"", [OPTIONAL]
        "custom_field_7":"", [OPTIONAL]
        "custom_field_8":"", [OPTIONAL]
        "custom_field_9":"", [OPTIONAL]
        "custom_field_10":"", [OPTIONAL]
        "custom_field_11":"", [OPTIONAL]
        "custom_field_12":"", [OPTIONAL]
        "custom_field_13":"", [OPTIONAL]
        "custom_field_14":"", [OPTIONAL]
        "custom_field_15":"", [OPTIONAL]
        "custom_field_16":"", [OPTIONAL]
        "custom_field_17":"", [OPTIONAL]
        "custom_field_18":"", [OPTIONAL]
        "custom_field_19":"", [OPTIONAL]
        "custom_field_20":"", [OPTIONAL]
        "custom_field_21":"", [OPTIONAL]
        "custom_field_22":"", [OPTIONAL]
        "custom_field_23":"", [OPTIONAL]
        "custom_field_24":"", [OPTIONAL]
        "custom_field_25":"", [OPTIONAL]
        "custom_field_26":"", [OPTIONAL]
        "custom_field_27":"", [OPTIONAL]
        "custom_field_28":"", [OPTIONAL]
        "custom_field_29":"", [OPTIONAL]
        "custom_field_30":"", [OPTIONAL]
    }
]

Double Opt-in

Data packet is sent in the following structure via HTTP POST in the raw body as JSON approximately every 15 seconds.

[

    {
        "user_id": "User ID - Integer",
        "email_address": "User Email Address e.g. some@one.com",
        "reference_code": "User Reference Code - String",
        "email_verification_status": "CONFIRMED or UNCONFIRMED",
        "email_verification_date": "YYYY-MM-DD HH:MM:SS",
        "email_verification_confirmation_date": "YYYY-MM-DD HH:MM:SS",
        "workflow_api_identifier": "Workflow API ID - String",
        "workflow_action_description": "Workflow Action Description - Text",
        "user_agent": "Request User Agent String",
        "ip_address": "Request IP Address",
        "rest_hook_id": "Internal ID - Integer",
        "company_id": "Account ID - Integer",
        "company_api_identifier": "Account API ID - String"
    }

]

Campaign Sent

Data packet is sent in the following structure via HTTP POST in the raw body as JSON approximately every 15 seconds.

[
    {
        "campaign_id": "6789",
        "campaign_name": "My Email",
        "email_profile_id": "123",
        "email_profile_name": "My Profile",
        "campaign_delivery_date": "2017-01-16 10:05:26",
        "campaign_report": "https:\/\/control.example.com\/campaigns\/reports?e=s50-UPQOmHSavZVgSWV_BXoPb0ErVGbDp3BSzxy8hmrSY16EOO5Hn00h1BTGLAAbkTp85Zwg..",
        "lists_used": [
            {
                "list_id": "456",
                "list_api_identifier": "MYLIST1",
                "list_description": "My List",
                "list_type": "ADDITIONS"
            },
            {   
                "list_id": "654",
                "list_api_identifier": "MYSUPPRESSION1"
                "list_description": "My Suppression List",
                "list_type": "SUPPRESSIONS"
            }
        ]
    }
]

Email Opens

Data packet is sent in the following structure via HTTP POST in the raw body as JSON approximately every 15 seconds:

[
    {  
        "user_id":"12345",
        "email_address":"some@one.com",
        "reference_code":"some-reference",
        "ip_address":"127.0.0.1",
        "user_agent":"Mozilla\/5.0 (X11; Linux x86_64; rv:45.0) Gecko\/20100101 Thunderbird\/45.6.0 Lightning\/4.7.6",
        "email_type":"WORKFLOW",
        "email_sent_date_time":"2017-01-16 10:05:26",
        "email_open_date_time":"2017-01-16 10:45:12",
        "campaign_id":"",
        "campaign_description":"",
        "test_message":"",
        "journey_id":"6789",
        "workflow_api_identifier":"my_workflow",
        "workflow_id":"4",
        "workflow_action":"Email",
        "workflow_action_id":"16",
        "workflow_description":"My Workflow"
    }
]

Link Clicks

Data packet is sent in the following structure via HTTP POST in the raw body as JSON approximately every 15 seconds:

[
    {  
        "user_id":"12345",
        "email_address":"some@one.com",
        "reference_code":"some-reference",
        "ip_address":"127.0.0.1",
        "user_agent":"Mozilla\/5.0 (X11; Fedora; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/55.0.2883.87 Safari\/537.36",
        "destination_url":"http:\/\/client.co.uk?utm_source=emailmarketing&utm_medium=email&utm_campaign=my_email&utm_content=2017-01-16_0912",
        "email_type":"CAMPAIGN",
        "email_sent_date_time":"2017-01-16 10:05:26",
        "link_clicked_date_time":"2017-01-16 10:45:12",
        "campaign_id":"6789",
        "campaign_description":"My Email",
        "test_message":"FALSE",
        "journey_id":"",
        "workflow_api_identifier":"",
        "workflow_id":"",
        "workflow_action":"",
        "workflow_action_id":"",
        "workflow_description":""
    }
]

Unsubscribes

Data packet is sent in the following structure via HTTP POST in the raw body as JSON approximately every 15 seconds:

[
    {  
        "user_id":"12345",
        "email_address":"some@one.com",
        "reference_code":"some-reference",
        "ip_address":"127.0.0.1",
        "user_agent":"Mozilla\/5.0 (X11; Fedora; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/55.0.2883.87 Safari\/537.36",
        "email_type":"CAMPAIGN",
        "email_sent_date_time":"2017-01-16 10:05:26",
        "user_optout_date_time":"2017-01-16 10:45:12",
        "unsubscribe_level":"GLOBAL",
        "campaign_id":"6789",
        "campaign_description":"My Email",
        "test_message":"FALSE",
        "journey_id":"",
        "workflow_api_identifier":"",
        "workflow_id":"",
        "workflow_action":"",
        "workflow_action_id":"",
        "workflow_description":""
    }
]

Hard Bounced Emails

Data packet is sent in the following structure via HTTP POST in the raw body as JSON approximately every 15 seconds:

[
    {  
        "user_id":"12345",
        "email_address":"some@one.com",
        "email_result_message":"bad-mailbox - Requested action not taken: mailbox unavailable",
        "email_mail_server":"mail.server.co.uk (112.64.58.11)",
        "email_response_code":"550",
        "email_source_ip":"192.168.1.50",
        "email_sent_date_time":"2016-12-20 10:33:03",
        "email_type":"CAMPAIGN",
        "campaign_id":"439",
        "test_message":"FALSE",
        "journey_id":"",
        "workflow_api_identifier":"",
        "workflow_id":"",
        "workflow_action":"",
        "workflow_action_id":"",
        "workflow_description":""
    }
]

Soft Bounced Emails

Data packet is sent in the following structure via HTTP POST in the raw body as JSON approximately every 15 seconds:

[
    {  
        "user_id":"12345",
        "email_address":"some@one.com",
        "email_result_message":"spam-related - 5.2.0 LCgK1u00b1bqCzy01CgMqT Spam content found",
        "email_mail_server":"mail.server.co.uk (112.64.58.11)",
        "email_response_code":"554",
        "email_source_ip":"192.168.1.50",
        "email_sent_date_time":"2016-12-20 10:33:03",
        "email_type":"CAMPAIGN",
        "campaign_id":"439",
        "test_message":"FALSE",
        "journey_id":"",
        "workflow_api_identifier":"",
        "workflow_id":"",
        "workflow_action":"",
        "workflow_action_id":"",
        "workflow_description":""
    }
]

FBL Complaints

Data packet is sent in the following structure via HTTP POST in the raw body as JSON approximately every 15 seconds:

[
    {  
        "user_id":"12345",
        "email_address":"some@one.com",
        "email_from":"staff@hotmail.com",
        "email_to":"reports@hotmail.spamloop.co.uk",
        "email_subject":"complaint about message from 192.168.1.50",
        "feedback_loop":"MSN\/Hotmail",
        "processed_date_time":"2017-01-16 10:45:12",
        "email_type":"CAMPAIGN",
        "email_sent_date_time":"2016-12-20 10:33:03",
        "campaign_id":"621",
        "campaign_description":"My Email",
        "test_message":"FALSE",
        "journey_id":"",
        "workflow_api_identifier":"",
        "workflow_id":"",
        "workflow_action":"",
        "workflow_action_id":"",
        "workflow_description":""
    }
]

Feedback Form Submissions

Data packet is sent in the following structure via HTTP POST in the raw body as JSON approximately every 15 seconds:

[
    {  
        "user_id":"12345",
        "email_address":"some@one.com",
        "journey_id":"",
        "workflow_api_identifier":"",
        "workflow_id":"",
        "workflow_action":"",
        "workflow_action_id":"",
        "workflow_description":""
        "campaign_id":"621",
        "campaign_description":"My Email",
        "email_type":"CAMPAIGN",
        "email_sent_date_time":"2017-01-16 10:05:26",
        "feedback_submission_date_time":"2017-01-16 13:31:01",
        "email_result_code":"250",
        "email_result_message":"2.0.0 OK 1259325756 3si8687534ewy.62",
        "email_mail_server":"ASPMX.L.google.com (209.85.219.50)",
        "email_from_name":"Some Client",
        "email_from_address":"some@client.mailserver.co.uk",
        "feedback_details":"I do not require this service any more,\r\n\r\nThanks!",
        "test_message":"FALSE"
    }
]

Right to Be Forgotten

Data packet is sent in the following structure via HTTP POST in the raw body as JSON approximately every 15 seconds. The forgotten_user_email_hash field will only be populated when using the Anonymise action.

[
    {
        "user_id": "12345",
        "email_address": "some@one.com",
        "forgotten_user_action": "BLANK",
        "forgotten_user_email_hash": "",
        "forgotten_user_date_time": "2019-10-18 12:31:17",
    }
]

Related Pages