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 > Manage Channels and enable the Webhook toggle.

Once it has been enabled you will see it as a communications channel from the campaign creation menu (Campaigns > Create Campaign > Single-stage > Time-based > Create Campaign > select Webhook from the Setup tab.).

Navigate to the Content tab to build your webhook.

Set 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 content guide for more details on how to set up your webhook.

Test 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 make sure that personalised variables have a fallback 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 > Options menu on the right of the campaign > Notifications log. For more information review our dedicated Notifications log guide.

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

2098

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

2628

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.