Delivery & Retries

View as Markdown

FormantAI retries webhook delivery for transient failures.

Success criteria

Your endpoint should return any 2xx response within 10 seconds.

1HTTP/1.1 204 No Content

Retry schedule

AttemptTiming
1Immediate
230 seconds later
3300 seconds later

Retry conditions

FormantAI retries:

  • Network errors
  • Timeouts
  • HTTP 429
  • HTTP 5xx

FormantAI does not retry most 4xx responses because they usually mean the request was rejected permanently.

Timeout

Each delivery attempt has a 10 second timeout. If your workflow needs more time, store the event and process it asynchronously.

Idempotency

Webhook deliveries can be retried. Your endpoint must be idempotent.

Use event_id as the primary dedupe key.

1app.post("/webhooks/formant", async (req, res) => {
2 const event = req.body;
3 const inserted = await insertWebhookEventIfNew(event.event_id, event);
4
5 if (!inserted) {
6 return res.status(204).send();
7 }
8
9 await enqueueWebhookWork(event.event_id);
10 res.status(204).send();
11});

Delivery metadata

Delivery attempts are stored on the conversation metadata for debugging. Use the Conversations API and trace_id when investigating missed downstream updates.

Receiver checklist

  • Verify the HMAC signature.
  • Persist the raw event.
  • Dedupe by event_id.
  • Return quickly.
  • Process business logic in a queue.
  • Monitor failure rates and latency.