Create & Manage Advocate Webhook Subscriptions
Webhooks are code that executes when an event happens. Advocate allows you to use webhooks to register a URL that we will POST to any time an event happens in your program, e.g., when a vanity coupon code is created for a new participant, an event object is created. There are two methods for creating and managing webhooks: via the Advocate API or in the Advocate platform. This help article will explain how to manage webhooks through the Advocate platform.
Create a webhook subscription
From the top navigation bar, select
[User profile] → Settings.
In the left column below Advocate Settings, select Webhooks.
On the Webhook Subscriptions page, select Create Subscription.
Below Post to URL, enter the unique address the application uses to send real-time updates about specific events.
Optionally, below Webhook Name, enter the name of the new webhook subscription.
Select Save.
Troubleshoot webhook logs
When you register a URL to which Advocate posts whenever an event happens in your program, you can review the logs and troubleshoot any webhook events that fail.
Access your webhook logs
From the top navigation bar, select
[User profile] → Settings.
In the left column below Advocate Settings, select Webhooks.
On the Webhook Subscriptions page, select View Logs.
Use the filters below Webhooks Event Log to filter the webhooks.
Refer to the Filter reference below for more information.
View webhook details
Select a specific webhook to open the Webhook Details view.
This view provides information that can be used to troubleshoot a webhook subscription.
Refer to the Event reference below for more information.
Webhook retry system for failed event deliveries
Rest hooks are delivered immediately after an event is triggered. If the endpoint does not successfully respond to a delivery attempt (i.e., respond with a status code other than 200), the delivery will be considered as failed.
Failed deliveries will be reattempted every hour after the previous failed attempt until either a successful delivery is made or until 72 attempts have been made (approximately 3 days at the rate of 1 retry per hour).
Webhook endpoints that consistently return errors will be automatically disabled after the following number of errors:
Status codeErrors received4xx errors
1000
5xx errors
2000
3xx errors
2000
Last updated
Was this helpful?

