Build

Webhook retries, inspection, and replay

The retry schedule, receiver timeout, delivery statuses, dead letter, automatic disabling, secret rotation overlap, and how to test and replay deliveries.

What counts as delivered

  • Your endpoint must answer with a 2xx status within 15 seconds. Anything else is a failed attempt: another status, a redirect (redirects are not followed), a timeout or a connection error.
  • Answer once the event is stored or queued on your side, not after all downstream work finishes.
  • Answer 2xx to a verified duplicate you have already recorded.

Retry schedule

Each delivery gets up to 8 attempts over about 27 hours, following the schedule below with ±20 percent random jitter. A Retry-After header on a 429 or 503 response is honoured when it asks for a longer wait, up to 1 hour.

AttemptWait after it failsThen
14 s to 6 sWait before attempt 2.
24 min to 6 minWait before attempt 3.
324 min to 36 minWait before attempt 4.
41.6 h to 2.4 hWait before attempt 5.
54 h to 6 hWait before attempt 6.
68 h to 12 hWait before attempt 7.
78 h to 12 hWait before attempt 8.
8Final attemptIf it fails, the delivery moves to DEAD_LETTER.

Delivery statuses

StatusMeaning
PENDINGWaiting for its first attempt.
LEASEDAn attempt is in progress.
RETRY_WAITAn attempt failed; the next one is scheduled.
DELIVEREDYour endpoint answered 2xx.
FAILEDNot retried: the URL was refused as unsafe (for example a private address), or your endpoint answered a 4xx other than 408, 425 or 429. Replay it after fixing the cause.
DEAD_LETTERAll attempts failed, or the endpoint was deleted (lastErrorCode WEBHOOK_ENDPOINT_DELETED). It is kept, with every attempt, until you replay it.
CANCELLEDNot sent: the endpoint was re-enabled and its waiting deliveries were skipped.

Dead letter and automatic disabling

When an endpoint keeps failing, Wellfriend sends com.wellfriend.webhook.endpoint.failing.v2 to your other subscribed endpoints after 24 and 72 hours, and disables the endpoint after 5 days of continuous failure (status DISABLED, disabledReason PERSISTENT_DELIVERY_FAILURE). An endpoint that answers 410 Gone is disabled at once (RECEIVER_GONE). No new deliveries are sent to a disabled endpoint.

After 10 consecutive failures, or 90 percent of the last 50 attempts, deliveries to the endpoint are paused (no attempts are used up) and a single probe is sent every 5 minutes, backing off to 1 hour; a successful probe resumes delivery.

Fix the receiver, then re-enable the endpoint: choose Enable in Developer API → Webhooks, or send PATCH https://wellfriend.dev/api/v2/webhook-endpoints/{endpointId} with {"enabled":true} for an endpoint created through the v2 API. Then replay the dead-letter deliveries you need.

Inspect deliveries

Inspect deliveries in the delivery log of Developer API → Webhooks, or list them with GET https://wellfriend.dev/api/v2/webhook-deliveries (optionally ?endpointId={endpointId}; scope webhooks.read). Each record has its status, attempt count, last error code and the history of every attempt (HTTP status, duration and the secret that signed it).

Before you replay, checkQuestion
SignatureDid the request reach the right endpoint and pass verification?
Receiver responseDid it fail on the network, in validation, in storage or in downstream work?
Stored eventDid your receiver already store the event even though the response was lost?
Side effectsHas any external action already happened for this event?
Current handlerDoes the fixed code handle this event safely if it runs again?

Replay

Choose Replay delivery in the delivery details in Developer API → Webhooks, or send POST https://wellfriend.dev/api/v2/webhook-deliveries/{deliveryId}/replay with an Idempotency-Key header, using a key with the webhooks.write scope. The API answers 202.

A replay creates a new delivery for the same event. It has a new delivery ID and starts again at attempt 1 with the full retry schedule, but keeps the event ID, so webhook-id is unchanged and your deduplication still works. The original delivery and its attempts stay in the history. The endpoint must be ACTIVE for the replay to be sent.

Limits

A workspace holds a fixed number of endpoints, and replays of one endpoint are limited per hour.

Schedule limits count active and paused schedules, not disabled ones. Endpoint limits do not count deleted endpoints. The same limits apply in the dashboard, the API, the SDKs and MCP.

LimitValueWhen it is reached
Schedules per automation20WORKFLOW_SCHEDULE_LIMIT_REACHED
Schedules per workspace200WORKFLOW_SCHEDULE_LIMIT_REACHED
Webhook endpoints per workspace and environment (test or live)20WEBHOOK_ENDPOINT_LIMIT_REACHED
Replays of one endpoint's deliveries in any hour200WEBHOOK_REPLAY_LIMIT_REACHED
Deliveries in one bulk replay1,000Bulk replay stops at the limit
File size of one MCP URL import25 MBThe import is refused

Test deliveries

Send test in Developer API → Webhooks sends a com.wellfriend.webhook.test.v1 event, and POST https://wellfriend.dev/api/v2/webhook-endpoints/{endpointId}/test (Idempotency-Key header, scope webhooks.write) sends com.wellfriend.webhook.test.v2. The test goes only to that endpoint, whatever its event filters, and uses the same signing, retries and statuses as real events. The endpoint must be ACTIVE.

Secret rotation overlap

After a rotation, the previous secret stays valid for 24 hours by default and every attempt carries a signature for each valid secret. Accept both during the overlap; the signatures page has the details.

Deduplication

Deduplicate on the event ID (webhook-id). Keep delivery and attempt IDs for troubleshooting. When one event triggers several side effects, such as a payment, an email or a call to another API, give each of them its own idempotency key.