Errors
idempotency_key_reused
This Idempotency-Key was already used with a different request body.
| HTTP status | Type | Code |
|---|---|---|
| 409 | idempotency_error | idempotency_key_reused |
What it means
An Idempotency-Key can only be reused with exactly the same method, path, and body within 24 hours. Generate a new key for a new request. It is also returned when the key already completed a request whose response held a one-time secret (such as a webhook signing secret): that response is never stored, so look the resource up instead.
How to handle it
Send a new Idempotency-Key for a different request body, or wait for the first request with this key to finish and retry.
Example response
{
"detail": "This Idempotency-Key was already used with a different request body.",
"error": {
"type": "idempotency_error",
"code": "idempotency_key_reused",
"message": "This Idempotency-Key was already used with a different request body.",
"param": null,
"docUrl": "https://docs.callmitra.ai/errors/idempotency_key_reused",
"requestId": "req_3f9c2a7d1b8e4c6a9f0e2d4b6a8c0e1f"
}
}Branch on error.code; it never changes once published. The message text can change. See Errors for the envelope.
Returned by
POST /api/v1/leads/dnc— Add numbers to do-not-callPOST /api/v1/tickets/{ticket_id}/activities— Add a note to a ticketPOST /api/v1/leads/bulk— Act on many leadsPOST /api/v1/agents/— Create an agentPOST /api/v1/calls/— Place a callPOST /api/v1/campaigns/— Create an empty campaignPOST /api/v1/campaigns/create-with-leads— Create a campaign with its leadsPOST /api/v1/leads/— Create a leadPOST /api/v1/leads/{lead_id}/notes— Add a notePOST /api/v1/tickets/— Create a ticketPOST /api/v1/webhook-endpoints/— Create a webhook endpointPOST /api/v1/agents/import— Import an agent from another platformPOST /api/v1/whatsapp/messages— Send a WhatsApp message