Retries and Delivery Guarantees
Design receivers for at-least-once delivery, fast acknowledgement, idempotency, and recovery.
Webhook consumers should assume that a delivery can arrive more than once and that downstream processing can fail after the sender receives an acknowledgement. Durable queues, idempotent handlers, and observable dead-letter flows are the safest operating model.
Receiver contract
- Verify the signature using the raw request body.
- Reject stale or duplicate delivery identifiers.
- Persist the accepted event to a durable queue.
- Return a 2xx response only after durable acceptance.
- Process asynchronously and record success or failure.
HTTP status handling
Idempotency pattern
create table webhook_deliveries (
delivery_id text primary key,
event_type text not null,
received_at timestamptz not null default now(),
processed_at timestamptz
);Insert the delivery id with a unique constraint before applying business changes. A duplicate insert means the same event has already been accepted and can be acknowledged without repeating the business action.
Processing deadlines
- Keep the acknowledgement path short and free of third-party API calls.
- Move CRM, storage, and analytics writes into the asynchronous worker.
- Apply bounded concurrency to prevent a retry burst from overwhelming downstream systems.
- Use exponential backoff with jitter for your own worker retries.
- Preserve the original event id, attempt count, and last error in observability tools.
Recovery workflow
- 01
Identify the failed cohort
Filter delivery logs by event type, destination, time range, and response class.
- 02
Repair the receiver
Resolve authentication, schema, capacity, or downstream dependency failures before replaying.
- 03
Replay from the immutable source
Reprocess stored deliveries in bounded batches using the original event id.
- 04
Reconcile outcomes
Compare business records, call identifiers, and CRM activity history for completeness.
Need implementation help?
Search the help center or talk with the OP26X telephony team.