POST requests require an Idempotency-Key header. The key lets you safely retry a request after a timeout or connection failure without creating the same resource twice.
Generate keys
Use a new unpredictable value, such as a UUID v4, for each logical creation request. Store it with the operation until you receive a definitive response.Node.js
Retry rules
- Retry the same operation with the same key and exactly the same request body.
- A completed replay returns the original response and includes
Idempotent-Replayed: true. - Reusing a key with a different body returns
409 idempotency_error. - Sending a concurrent duplicate while the first request is still running returns
409 conflict_error; wait briefly, then retry the same request. - Keys are retained for 24 hours.
PATCH, PUT, GET, and DELETE requests do not require this header. See Errors for bounded retry guidance.