Skip to content

Webhook delivery

An attempt succeeds when your endpoint answers any 2xx within 10 seconds. Anything else fails it: another status (a redirect too), a timeout, a refused connection, a name that does not resolve. A failed event is tried again after 30 seconds, 2 minutes, 10 minutes, 1 hour and 6 hours, one delay after another. A URL that now resolves to a private address is not tried again.

Delivery is at least once: a retry, or a rare second delivery after a crash on our side, brings an event you may have handled. Every attempt of an event has the same webhook-id header and the same event_id in its body — keep the ids you handled and skip a repeat. The webhook-timestamp and the signature are new on each attempt.

An organization’s webhooks share 5 attempts a minute on Free and 100 on Pro. An attempt over it is skipped: it is recorded in the history with the outcome skipped, it is not a failure, and the event is never sent later.

To catch up, read the skipped attempts in the history. Of message.received and message.sent, the subject_id is the message (msg_…), which GET /v0/messages/{message_id} returns; of a recipient event, it is the delivery (dlv_…), whose outcome shows in the sent message’s labels; of domain.verified, the domain (dom_…). Or list the mail that arrived meanwhile with GET /v0/messages and after.

After 3 failed attempts in a row — of one event or several, retries included — the webhook is paused: enabled turns false with disabled_reason: "failing", and the dashboard shows Paused after failed deliveries. A success in between starts the count again; a skipped attempt does not count.

While a webhook is paused, nothing is sent, and events of that time are never sent later. Fix the endpoint, then turn the webhook on: Turn on on its page, PATCH /v0/webhooks/{webhook_id} with {"enabled": true}, or update_webhook(webhook_id=…, enabled=true). Mail that arrived while it was paused is in the API: list it with GET /v0/messages and after. You can pause a webhook yourself the same way, with false.

A message.received body is at most 256 KB. A larger message is cut to fit, in this order: its extracted_text is left out, then its links and codes, then its subject, sender and recipients are shortened. The fields that were cut are listed in the body’s message.truncated (empty when nothing was), and GET /v0/messages/{message_id} returns the message whole. Webhook bodies never carry the HTML, the headers or the attachments.

Every attempt is kept for 7 days: GET /v0/webhooks/{webhook_id}/attempts (MCP: list_webhook_attempts), newest first, and Deliveries on the webhook’s page in the dashboard.

Field What it is
event_id, event_type The event: its id (the webhook-id header) and its type
subject_id What the event is about: a message msg_…, a recipient’s delivery, a domain
attempt 1 for the first attempt of the event, then 2, 3…
outcome delivered, failed or skipped
status_code Your endpoint’s answer, when it gave one
error Why a failed attempt failed: bad_status, timeout, connection_failed, dns_failed, blocked_target
duration_ms From the first DNS lookup to your answer’s status line

The Deliveries of a webhook in the dashboard: each attempt’s time, outcome, event and time taken