When a delivery attempt fails, Arowana retries with growing delays. Your handler must be idempotent and respond quickly.

What counts as failed

An attempt succeeded only when your endpoint answered with a 2xx status within 5 seconds. Everything else is a failed attempt and is retried:
  • any other status — 4xx, 5xx, and also 3xx: redirects are not followed
  • no answer within 5 seconds
  • a connection that could not be made or broke off

Retry schedule

Every delivery gets 5 attempts in all — the first one and 4 retries, spread over about 25 hours: After the 5th failed attempt the delivery is marked as permanently failed and is not tried again by itself. An endpoint that is down for longer than that (a weekend, say) misses those events until you replay them. Each attempt carries its number in the X-Arowana-Attempt header (1–5). The same number can arrive twice when a delivery was interrupted before its outcome was recorded — deduplicate by X-Arowana-Event-Id, never by the attempt number.

Replays

A delivery that failed for good — or one stuck past its due time — can be sent again: Send again in Settings → API & webhooks → Recent calls to your endpoints, or by API:
The replay answers { "delivered": true|false, "status_code", "error", "delivery" }. A delivery that is still on its retry schedule, or already succeeded, answers 409 conflict with current_status — it is never sent twice at once. A replay starts the attempt count again at 1. There is no automatic switch-off of an endpoint that keeps failing, and no alert for it yet: check GET /v1/webhooks/{id}/deliveries?status=failed from your monitoring.

Ordering

Events are delivered best-effort ordered. Network conditions, retries, and parallel delivery mean events may arrive out of order. Always use the id and timestamp fields on the event envelope for deduplication and sequencing — not arrival order. timestamp has millisecond precision; there is no sequence number, so two events of the same millisecond have no defined order.

Timeout

Your handler must respond with a 2xx status code within 5 seconds. If it takes longer, the delivery is treated as failed and retried.
Process events asynchronously — do not do slow downstream work inside the handler. Store the event in a queue or table of your own, return 200, and process it in a background job that retries.

Answer 200 only for work that is safe

A 2xx tells Arowana the event is in your hands: it is not delivered again. So answer 2xx only when the event is processed, or stored where your own job will process and retry it. This matters most when your handler calls Arowana back — for example it receives contact.created and sends POST /v1/events to start a welcome campaign. If that call fails (429, 5xx, a timeout) and the handler still answers 200, the event is gone: Arowana does not redeliver the webhook, nobody sends the API call again, and the campaign never starts. Do one of these:
  • Store first, then answer 200. Your background job makes the API call and retries it as described in Send an event → Retrying. This is the safer way: your job can retry within seconds, for as long as it takes.
  • Call inside the handler, and answer 5xx when the call failed. Arowana then delivers the webhook again on the schedule above. Keep the call well under the 5-second limit. Mind that the schedule is coarse — the retries come after about 1 minute, 5 minutes, 1 hour and 24 hours, and after the fifth failed attempt the delivery stays failed until you replay it.
Either way, use a body idempotency_key built from the webhook event id for the call back. The id is the same on every redelivery and replay, so the event is recorded once however often the webhook arrives.

Idempotency

The same event id may arrive more than once — retries, replays, or a delivery interrupted before its outcome was recorded. Your handler must be idempotent:
  • Record each event id once (a unique key), and skip one you already finished
  • Mark an event done only after its work succeeded — otherwise a failure after the mark loses the event for good
  • Use upserts rather than inserts, and design side effects to be safe to repeat. When the work sends a message through Arowana, use the event id as its Idempotency-Key, so a second run never sends twice
A handler that answers fast and processes in a worker:
If processEvent throws, the row stays pending and your queue retries it — the event is never lost by having been marked too early. For work that writes to the same database, do the work and the status = 'done' update in one transaction.