Skip to main content
HTTP status: 409 · Title: “Idempotency key conflict”

When it fires

The same Idempotency-Key was used for two requests with different bodies. The server will neither execute the second request (that would break idempotency) nor replay the first response (that would mislead you about which request took effect).

Why it happens

  • Most common: a retry layer rebuilt the body on each attempt instead of capturing it once and replaying it.
  • A bug that mutates the body between preparing the request and sending it.
  • Two distinct operations accidentally sharing a key (for example, a key generator that is not safe under concurrency).

How to fix

  • Fix the body before generating the key, then either:
    • capture body and key together in your retry wrapper and resend the exact pair on every attempt, or
    • generate a fresh key per logical operation (one trade, one key).
  • If the body legitimately changes between attempts (for example an updated timestamp), it is a new operation: use a new key.
See Idempotency.