Protocols
Saved & recent

Idempotency key

Also called: deduplication key, client request token

An idempotency key identifies one intended operation across repeated requests. A supporting server records or coordinates the operation under that key so that a retry does not simply execute it again. Its contract must define scope, retention, parameter matching and what happens when requests overlap.

After a create-order response is lost, a client can repeat the same request with the same key and obtain the already-created order under a suitable API contract. A genuinely new order needs a new key. Sending a random header to an unsupported endpoint provides no protection, and reusing a key after its record expires may create a new operation.

Read first
Idempotency
Related
Idempotency, Retry backoff and jitter, Correlation ID
Further reading
Stripe — Idempotent requests
client order API create order · key K17 first response lost same parameters · key K17 returns order O42 K17 O42 retained result record one stored order supported API contract
Under an API’s documented retention and matching rules, a retry reuses the key and retrieves the original operation’s result.

View in the full Protocols collection