Idempotency-Key header lets you retry a write without applying it twice. Send a unique key with the request; if you send the same request with the same key again, End Close returns the first response instead of repeating the write.
Use it whenever a write might have landed but you didn’t get the answer: a timeout, a dropped connection, or a worker that restarted mid-request.
Endpoints that accept Idempotency-Key
Other endpoints ignore the header.
Send a key
Generate a unique value per logical write, such as a UUID, and reuse it only when retrying that same write. Keys can be up to 255 characters.cURL
What happens when you reuse a key
End Close compares the retry with the first request using the method, the path, the query string and the JSON body. Key order inside the JSON doesn’t matter.
Only successful responses are stored. If the first request fails or is refused, the key is released, so you can fix the request and send it again with the same key. If the first request never finished, for example because the server handling it stopped, a retry with the same key runs the request once 10 minutes have passed.
Keys belong to one environment and are kept for 7 days. A Sandbox key and a Production key with the same value don’t interact.
Bulk record uploads
POST /records/bulk handles the header differently. If a bulk request with that key already exists in your environment, the API returns the existing bulk request with 202 Accepted instead of creating a new one. The request body isn’t compared with the original.
Create a record with your own ID
POST /records has a second option. Send your own id (a UUID; uuidv7 recommended) in the body. If a record with that id already exists in your environment, the API returns it with 201 Created instead of creating a duplicate, and the first write wins. An id already used in another environment returns 409 Conflict.
FAQ
How do I know a response was replayed?
How do I know a response was replayed?
A replayed response has the header
Idempotent-Replayed: true. Its status and body match the first response.Can I reuse a key after a 422 validation error?
Can I reuse a key after a 422 validation error?
Yes. A failed or refused request doesn’t keep its key, so you can correct the request and send it with the same key.
Do GET requests need an idempotency key?
Do GET requests need an idempotency key?
No. Reads don’t change data, and the API ignores the header on them.
Related
Errors
Status codes and retry guidance.
Bulk create records
Upload up to 1,000 records in one request.