Idempotency-Key makes sending it again safe.
What happens
1
The first time
The request is carried out, and its answer is remembered under the key.
2
Every time after
Nothing is carried out. The first answer comes back, byte for byte, with the header
Idempotent-Replay: true.The rules
- Any change takes one: every
POST,PUT,PATCHandDELETE. AGETchanges nothing and ignores it. - A key is yours alone. It is remembered for the API key and the route it was sent with. Another of your keys using the same word is a different request.
- The same key with a different request is refused, with
idempotency_key_reused. That is a mistake in the caller, and answering it with the first request’s result would hide it. A new change takes a new key. - Only an answer that worked is remembered. A refusal changed nothing, so once you have put the request right you may send it under the same key.
- A request still being carried out answers
request_in_progressto a second one sent under its key. Wait a moment and send it again. - Keys are remembered for seven days.

