Steps
- Generate one unique
Idempotency-Keyfor the intended write. - Send the write request with that key.
- If the request times out, retry the same method, path, query, and body with the same key.
- If the API returns
idempotency_conflict, keep the original payload or generate a new key for a new operation.
Generate a key
Use a random UUID with a short operation prefix:Example
Recovery
rate_limited: retry after theretry-afterheader.idempotency_key_in_progress: retry the same request after a short delay.idempotency_conflict: do not retry with changed payload under the same key.