Idempotency
Retry safely without doubling up.
Print this section · every page on one document
Articles
Troubleshooting
Questions about idempotency
What if I reuse an idempotency key with a different body?
You get
422witherror.codeofidempotency_key_reused: the key was already used for a different request (another method, URL or body).The same key with the same request returns the stored answer with
Idempotent-Replayed: true, so nothing is done twice. Keys belong to your app, and answers are kept for 24 hours. Use a new key for each distinct write, and the same key only when you retry that write. After a422, fix the request and send it with a new key.See My request fails with idempotency_key_reused and Safe retries with idempotency keys.
Open “What if I reuse an idempotency key with a different body?” on its own page