idempotency_key_in_progress
- HTTP status
- 409
- Retry
- After Retry-After
- Execution
- Work may have started
- Admin needed
- No
Request with this Idempotency-Key in progress. An earlier request with the same key has not finished yet. When it finishes, a successful (2xx) answer is stored and a retry with the same key replays it; so is an error whose documentation says its outcome is unknown and the answer is kept (for example campaign_outcome_unknown). Any other error is not stored, and the retry then runs the request again.
What it means
The API returns HTTP 409 with error.code set to idempotency_key_in_progress. The default message is: "A request with this Idempotency-Key is still being processed."
Common causes
- A client retried before the first attempt finished.
- Two workers sent the same operation concurrently.
How to identify it
Check the response status (409) and error.code (idempotency_key_in_progress). Branch on error.code, not on the message text: messages can be reworded, codes do not change within v1. Log error.request_id (also sent as the X-Request-Id header) so support can find the request.
How to fix it
- Wait for
Retry-Afterseconds and send the identical request again with the same key.
Retry guidance
Wait for the number of seconds in the Retry-After header. For a write, read the resource first to find out whether the change was applied before you send anything again.
Did anything happen?
The work may have started before this error was returned. Do not assume nothing happened: read the resource (for a call, list calls filtered by to and created_after; for a campaign, retrieve it) before you send anything again.
Idempotency
Keep the SAME key. After Retry-After the retry replays the stored answer if the first request stored one, or runs the request if it ended in an error that is not stored.
Who can fix it
The developer who sends the request can fix it; no administrator action is normally needed.
When to contact support
If the error persists after the steps above, contact support@relationsai.com. See Support for what to include (the request_id, the time in UTC, the operation, and whether you used a test or live key) and what never to send (API keys, Authorization headers, webhook signing secrets, recording links, transcripts or customer data).
Example error response
JSON
Operations that can return this error
POST /calls: Place a callPOST /campaigns: Create a campaignPOST /campaigns/{campaign_id}/recipients: Add recipientsPOST /campaigns/{campaign_id}/start: Start a campaignPOST /campaigns/{campaign_id}/pause: Pause a campaignPOST /campaigns/{campaign_id}/resume: Resume a campaignPOST /campaigns/{campaign_id}/stop: Stop a campaignPOST /contacts: Create a contactPOST /contacts/upsert: Create or update a contact by phone numberDELETE /contacts/{contact_id}: Delete a contactPOST /dnc-entries: Add a number to the do-not-call listDELETE /dnc-entries/{dnc_entry_id}: Remove a number from the do-not-call listPOST /webhook-endpoints: Create a webhook endpointDELETE /webhook-endpoints/{webhook_endpoint_id}: Delete a webhook endpointPOST /webhook-endpoints/{webhook_endpoint_id}/rotate-secret: Rotate a webhook signing secretPOST /webhook-endpoints/{webhook_endpoint_id}/test: Send a test eventPOST /webhook-deliveries/{webhook_delivery_id}/retry: Retry a delivery
See all codes in the error-code reference.