All terms

Idempotency key

An idempotency key is a unique value sent with a request so that replaying it returns the original result instead of acting twice.

In detail

Send one on every POST that spends money. Replaying the same key within 24 hours returns the original response rather than buying a second number, which is exactly what you need when a request times out and you cannot tell whether it succeeded. The key covers the whole operation rather than a single attempt, and a replay is marked with an Idempotent-Replay header so your logs show what happened.

Also known as

  • idempotent request
  • safe retry

Related terms