Events
Webhook Retry Logic
Understand how NextSign retries failed webhook deliveries and how to build duplicate-safe handlers.
Webhook Retry Logic
If a webhook delivery fails, NextSign retries automatically using exponential backoff.
What Counts as a Failed Delivery
A delivery is treated as failed when:
- the destination cannot be reached
- the request times out
- your endpoint returns a non-
2xxHTTP response
Delivery Schedule
NextSign attempts delivery immediately, then retries with increasing delay when the delivery fails.
Typical schedule:
- Attempt 1: immediate delivery
- Attempt 2: about 2 minutes later
- Attempt 3: about 4 minutes later
- Attempt 4: about 8 minutes later
- Attempt 5: about 16 minutes later
- Further attempts continue with exponential backoff
The current limit is up to 14 total delivery attempts for a webhook event.
Webhook delivery is at-least-once, not exactly-once. Your handler must tolerate duplicate deliveries.
Recommended Handler Design
- return
2xxas soon as the payload is accepted - move slow work into a queue or background worker
- deduplicate events before performing side effects
- log failures with enough detail to replay safely
Example Deduplication Key
function getIdempotencyKey(payload) {
const entity = payload.case || payload.flow;
return [payload.trigger, entity?._id, entity?.updatedAt].filter(Boolean).join(':');
}Operational Advice
- do not download large files before acknowledging the webhook
- do not send emails or sync external systems inline if the work can be queued
- monitor repeated failures so you can fix broken endpoints before the retry window is exhausted