Webhooks for Deliveries and Responses

If you have an API based campaign you can post back Delivery and click-through info to your own or a collaborator's endpoints for tracking purposes if necessary. This will work for both the Template and Trigger, and Create and Send patterns.

🚧

Delivery notifications will not function as expected for Android Push, iOS Push or Safari Web-Push campaigns. It is not recommended to rely on the post-backs for these types of messages due to the nature of the channel.
Deliveries can be tracked as expected for Chrome and Firefox Web-Push.

Two optional parameters can be added to both API requests:

Parameter

Description

webhook_delivery

The endpoint to send delivery data

webhook_open

The endpoint to send open/click response data

Template and Trigger

curl --request POST \
  --url https://external-api.xtremepush.com/api/external/execute/campaign \
  --header 'content-type: application/json' \
  --data '{
    "apptoken": "APPTOKEN",
    ....,
    "webhook_delivery": "https://example.com/webhook/campaign-delivered",
    "webhook_open": "https://example.com/webhook/campaign-opened",
  }'

👍

When using the Template and Trigger pattern to do one-to-one messaging, you can potentially construct unique post-back URLs for each execution if that suits your tracking use-case, for example:

"webhook_open": "https://example.com/webhook/unique-identifier"

Create and Send

curl --request POST \
  --url https://external-api.xtremepush.com/api/external/create/campaign \
  --header 'content-type: application/json' \
  --data '{
    "apptoken": "APPTOKEN",
    ....,
    "webhook_delivery": "https://example.com/webhook/campaign-delivered",
    "webhook_open": "https://example.com/webhook/campaign-opened",
  }'

Webhook Request

When a message, such as an email, is successfully delivered there will be a post-back to the webhook_delivery endpoint and if it is opened/clicked then there will be a post-back to the webhook_open endpoint. Data will take the following format:

{
    "time": TIMESTAMP_OF_EVENT,
    "device": {"id": DEVICE_ID},
    "profile": {"id": PROFILE_ID, "user_id": CUSTOMER_ID}   
    "send": {"id": SEND_ID},
    "campaign": {"id": CAMPAIGN_ID}
}

Updated about a year ago


Webhooks for Deliveries and Responses


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.