Skip to content
WebhooksLast updated

Webhook Retries and Disabling ​

What counts as success ​

  • A 2xx response from the receiver counts as success.
  • Any other status code (including 3xx), a timeout, or a connection failure counts as a failure. Redirects are not followed.
  • The connection timeout is 5 seconds and the total timeout is 15 seconds.

Retry schedule ​

An event is attempted up to 10 times. The first attempt is sent immediately, unless the endpoint has more than 50 events, including the new one, that are waiting to be sent or being retried; then new events and retries that come due are sent in a catch-up run that happens every 5 minutes. After a failure, Dolyu waits as shown below before the next attempt, and each wait is randomly adjusted by ±10%:

Failed attemptWait before next attempt
1st30 seconds
2nd5 minutes
3rd30 minutes
4th2 hours
5th6 hours
6th12 hours
7th24 hours
8th24 hours
9th24 hours

If the 10th attempt also fails, delivery of that event fails and is not retried.

If the response has a Retry-After header (in seconds or as an HTTP date) that is longer than the wait in the table, the Retry-After time is used instead; if it is shorter, it is ignored. At most 24 hours of Retry-After is honored.

The ping test event is sent once and not retried.

Ordering and duplicates ​

  • Events are not guaranteed to arrive in order.
  • webhook-id (the event's id) doesn't change when an event is retried, resent, or sent for a disabled period. Use it to deduplicate.
  • created_at and updated_at have one-second precision, so different events can carry the same time. To tell which is newer, compare data.appointment.updated_at; when the times are equal, retrieve the appointment from the API with data.appointment.id.

Automatic disabling ​

  • When all 10 attempts for an event fail, the endpoint's consecutive failure count goes up by 1. A successful automatic delivery (including a retry) resets the count to 0; a successful test event or manual resend does not.
  • When the consecutive failure count reaches 20, the endpoint is disabled automatically.
  • If the receiver responds with 410, the endpoint is disabled immediately.
  • If the URL resolves to a disallowed address before a send, the endpoint is disabled immediately.
  • ping test events don't count toward the consecutive failure count, but a 410 response or a disallowed address disables the endpoint in the same way.

When an endpoint is disabled, its events that have not finished sending are marked as failed, and events that occur while it is disabled are not sent automatically. To resume, re-enable the endpoint in the dashboard; the consecutive failure count restarts from 0. When you enable it, you can choose to send the events from the disabled period. See Manage endpoints.