# Event Delivery Model

Register account-level destinations with `POST /v1/webhooks`. A destination receives subscribed events across the account; filter `data.inbox_id` in your handler if you only want one inbox.

## Events and payloads

Automatic webhook dispatch covers `message.sent`, `message.received`, `message.delivered`, `message.opened`, `message.clicked`, `message.bounced` and `message.complained`. Sent/received events enter a durable outbox before Redis. Authenticated provider callbacks commit engagement events to that outbox in the same transaction as their receipt and state update. Disabled or unconfigured provider callbacks cannot produce live engagement events. `message.parsed` is not a dispatched event.

The webhook envelope contains `event`, `event_id`, `delivery_attempt`, `timestamp`, and `data`. Message identifiers are inside `data`. See [Webhooks](/docs/webhooks) for the payload and signature examples.

## Attempts and failure

Every plan gets up to seven attempts total: the initial attempt and retries after 1, 2, 4, 8, 16, and 32 seconds. Queue load can delay execution. Older queued jobs keep their original retry options.

Each attempt has a 30-second timeout. A 2xx response succeeds. The current sender can follow one validated redirect; use a direct HTTPS endpoint to avoid depending on redirects.

Delivery is not guaranteed: after the final failed attempt, automatic retries stop. Failed deliveries enter a dead-letter queue for recovery on every plan. See [Replay Mechanics](/docs/concepts/replay-mechanics).

## Duplicates and ordering

The same `event_id` can arrive more than once during retries or replay. Make processing idempotent and do not assume arrival order. Persist the event durably before acknowledging it; complete business processing with a retryable worker or a transaction so a crash does not mark unfinished work as done.

`delivery_attempt` is a number for automatic delivery attempts and the string `replay` for signed manual recovery. A retry changes the attempt number and envelope timestamp. Use `event_id` for deduplication, not the full request body or signature.

## Related

- [Webhook Reliability](/docs/operations/webhook-reliability)
- [Replay troubleshooting](/docs/operations/event-replay-troubleshooting)
