Retries and idempotency
6 attempts per delivery, replay from the dashboard, and Idempotency-Key for your own writes.
Webhook deliveries
- A delivery succeeds on any
2xx. Otherwise Hevia retries after 1, 5, 30, 120, 720 minutes (6 attempts in total), then marks itfailed. - Retries run when the business is active (there is no minute-by-minute scheduler), so a retry can come later than the schedule says.
- Each event is delivered once per subscription; the envelope
idis the key. The sameidcan still reach you twice (a timeout after your server already processed it), so store the ids you handled. - The delivery log keeps 30 days. Every delivery can be replayed from the dashboard with the same body and event id.
Your writes: Idempotency-Key
POST /contacts, POST /deals and POST /tasks accept Idempotency-Key (1 to 120 printable characters):
| Situation | Answer |
|---|---|
| First request with the key | Runs normally. |
| Same key, same body | The first answer again, with Idempotent-Replayed: true. Nothing is written twice. |
| Same key, different body | 409 conflict. |
| Same key while the first request still runs | 409 conflict. Retry a moment later. |
First request ended with 5xx | The key is free again; retry with it. |
Keys belong to one API key and are kept 24 hours. POST /events is idempotent by itself: the same type and id run the automations once.
Shell
curl -X POST "$HEVIA_API/deals" \
-H "Authorization: Bearer $HEVIA_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042-deal" \
-d '{"title":"Website relaunch","value_cents":480000}'Tip
Derive the key from your own record (for example order-1042-deal) instead of a random value. Then even a restart of your job cannot create a second deal.