Webhook retries, duplicates and switch-off
developers-webhook-retriesOn this page
How to answer a delivery, when Skeduler retries, how to stop an event with 410 Gone, and when a failing subscription is switched off.
Answer a webhook delivery
- Answer 2xx as soon as you've accepted it, and do slow work afterwards. A delivery times out after 10 seconds.
- Don't answer with a redirect (3xx). It's counted as delivered and not retried.
- Answer 410 Gone to say "stop": Skeduler removes the subscription and doesn't retry.
Webhook retries
A 4xx or 5xx answer, or a timeout, is retried up to 4 times, after 10 seconds, 30 seconds, 1 minute and 2 minutes: 5 attempts in all. A delivery that still hasn't gone out 6 hours after the event is dropped.
Deliveries aren't guaranteed to arrive in order.
Duplicate deliveries
The same event can arrive more than once, for example after a retry. Use delivery_id as the key and make your handling idempotent. Remembering the delivery_ids you've seen in the last 5 minutes also stops a captured delivery being replayed.
When a webhook is disabled
A webhook subscription that has had nothing but failed deliveries for 3 days is switched off. A delivery counts as failed once all 5 attempts have failed. Its status becomes disabled, and the business's Owners and Admins are emailed. Fix your endpoint, then subscribe again to the same event and URL: that switches the same subscription back on.
A delivery is skipped (not retried) when the app is suspended or revoked, the business's account is restricted, or the app no longer holds the event's read scope.
Related
In this section
- How webhooks work: subscriptions, events and deliveries
- Subscribe to webhook events
- Verify a webhook signature
- Webhook events and their payloads
- Webhook recipes: subscribe, verify and handle deliveries
- I'm not receiving webhook deliveries
- My webhook signature doesn't match
- My webhook subscription was disabled
- Does an integration get webhooks for its own API writes?