Webhooks quick start guide

Webhooks allow you to post info or trigger actions outside your app or website. You can use webhooks to provide other systems and applications with real-time information. For example, sending info to a DMP or CDP, placing a task on a CRM or triggering an action in another system. The flexibility of this channel allows you to send information to any endpoint.

Enabling webhook channel

To enable the Webhook channel navigate to Settings > Channels > External Services Channels, toggle the Webhooks slider and click Save.

Once it has been enabled you will see it as a communications channel from the campaign creation menu (Campaigns > Create Campaign > Send Now or Schedule Message).

Clicking on the Webhook checkbox will create the Webhook tab in the campaign builder. Select the tab to start setting it up.

Setting up a webhook

In order to use a webhook you will need to have API documentation for the service you want to send information to or take an action with. You can build and test it in a campaign. The webhook channel has provision for all the main components you will need to build an API call to another system. Review our webhook tab guide for more details on how to set up your webhook.

Testing a webhook

It is advisable to test webhooks before deploying them to your user base. To test a webhook create your campaign the way that you normally would and target test users.

Webhooks rely on Xtremepush's servers making requests to an external endpoint, and syntax and other errors may arise. The first step to avoiding webhook errors is to test your webhook campaign for syntax errors and making sure that personalised variables have a default value. However, webhooks may still fail due to issues like expired API keys, rate limits or unexpected server errors. If your webhook fails to send, an error message gets logged in the notifications log, accessible from Campaigns > Existing campaigns > Past/Live campaigns > options menu on the right of the campaign > Notifications log.

If you are working with a third party and you made a mistake in the URL, the notifications log would show that the webhook campaign failed to send:

By clicking on options menu > Details it is possible to drill down on the details of the error:

If the message body is not clear enough regarding the source of the error, you should check the documentation of the API endpoint you're using. These typically provide an explanation of the error codes the endpoint uses as well as what they’re typically caused by.

👍

Webhook templates

As a best practice, once your webhook is getting responses in the 20x response code range and working as expected it is recommended to copy its content (all the configured settings except for the message text) and save it as a template. This will allow you to quickly select it from the webhook tab in the campaign builder.

Updated 15 days ago


Webhooks quick start guide


Suggested Edits are limited on API Reference Pages

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