Skip to main content
A webhook endpoint is a URL on your server. When one of your dubs finishes we POST an event to it, so you don’t have to keep asking.

Adding an endpoint

Add one in Reedapt under Developers, or with the API:
The answer includes the endpoint’s signing secret (whsec_…). It is shown only this once. Store it with your other secrets. The URL must be public and use https://. Every endpoint gets every event for the account, whichever key started the dub.

Events

dub.completed
We may add event types. Ignore types you don’t handle, and answer them with 200 too.

Answering

Answer with any 2xx within 10 seconds. Do the slow work after answering, for example by putting the event on a queue. Anything else, or no answer in time, is retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 5 hours, then every 10 hours, for about 3 days. An event can occasionally arrive twice, so skip any id you’ve already handled.

Checking the signature

Every delivery has these headers: The signature is the hex HMAC-SHA256 of <t>.<raw body>, keyed with the endpoint’s secret. Refuse a delivery whose signature doesn’t match, or whose time is more than 5 minutes old.
Check the signature against the raw body exactly as it arrived. Parsing the JSON and encoding it again changes the bytes, and the signature won’t match.

Testing and troubleshooting

  • Send test event on the Developers page, or POST /webhook_endpoints/{id}/test, sends a webhook.test event to the endpoint.
  • The endpoint’s deliveries, in the Developers page or from GET /webhook_endpoints/{id}/deliveries, show each attempt, what your server answered, and when the next try is due.
  • While building, use a test key: its dubs are free, and you get real dub.completed events.