Idempotency-Key header when called with an API key:
Rules
- Use a new unique value per action, for example a UUID. Up to 200 printable ASCII characters.
- Reuse a key only to retry the same request. The request is identified by method, path, JSON body and any uploaded files (query strings are not part of it).
- Keys are remembered per API key for 24 hours after the first request finishes.
What happens on a retry
Which responses are remembered
402(insufficient wallet balance),429(rate limited) and503are not stored. Nothing happened, so retry with the same key after topping up or waiting.- Every other response is stored, including
5xxerrors. A server error can occur after the call was placed or the message sent, so a same-key retry returns the stored error instead of doing it twice. Check what happened (for example, list recent calls or messages), then use a new key if you still want to go ahead. - Authentication and scope failures (
401, and403from the scope check) happen before the key is checked, so they are not stored. - A
400validation error is stored. After fixing the body, send it with a new key: the corrected request is a different request, so reusing the old key returns422 idempotency_key_reused.
Endpoints that require it
Other endpoints ignore the header.
Pushing leads to /v1
POST /v1/campaigns/{campaignId}/leads and POST /v1/campaigns/{campaignId}/leads/batch do not use the
Idempotency-Key header. Instead, each lead carries its own idempotencyKey in the request body; pushing the same
key again is reported as a duplicate and nobody is called twice. In a batch, every result echoes the
idempotencyKey you sent. See Run a campaign end to end.
