Prompt
outbound webhooks with retries
Latest observation
Nov 8, 2026
OpenAI APIWeb search: off
Outbound webhooks with retries usually means: your system sends an HTTP request to a customer’s endpoint, and if it fails or times out, you try again automatically.
A solid webhook retry design usually includes:
Core pieces
- Timeouts: Don’t wait forever for the receiver.
- Retry policy: Retry on transient failures like:
- network errors
- 408, 429, 500, 502, 503, 504
- Backoff: Use exponential backoff, usually with jitter.
- Max attempts / max duration: Stop after a limit.
- Idempotency: Ensure the receiver can safely handle duplicates.
- Delivery status tracking: Store attempt history and final outcome.
- Dead-letter handling: After retries are exhausted, mark failed and alert/log.
Common pattern
- Webhook event is created.
- You enqueue a delivery job.
- A worker sends the HTTP request.
- If successful (
2xx), mark delivered. - If retryable failure, schedule the next attempt.
- If non-retryable failure, mark failed immediately.
Example retry policy
- Attempt 1: immediately
- Attempt 2: after 1 min
- Attempt 3: after 5 min
- Attempt 4: after 15 min
- Attempt 5: after 1 hr
- Then stop
Best practices
- Include a unique
event_idin every webhook. - Sign requests with HMAC so receivers can verify authenticity.
- Let receivers return
2xxquickly and process asynchronously if needed. - Provide a dashboard or logs for webhook attempts.
- Respect
Retry-Afterfor429when present.
Example failure handling
200 OK→ success400 Bad Request→ usually no retry401/403→ often no retry unless credentials may refresh404→ usually no retry500/503→ retry- timeout → retry
If you want, I can also help with:
- a database schema for webhook retries,
- a retry algorithm/pseudocode,
- or a production-ready design in a specific language/framework.