POST requires an Idempotency-Key header. Without one, the request is
rejected before the handler runs:
Sending a key
Generate one UUID per logical operation — not per HTTP attempt. All retries of the same operation reuse the same key.What a reused key does
A replay returns the stored response — the same body and the same status:
201, not 200. The response describes the original operation,
not the act of replaying it, so a client can handle both identically.
Keys are scoped to your token
Two tokens can use the same key without colliding. A key from a revoked token carries nothing over to its replacement — after rotating, an in-flight retry runs as a fresh request, so make sure the operation is also naturally deduplicated (a duplicate email returns409 conflict) if that matters to you.
Body comparison ignores key order
The fingerprint is taken over a canonicalized body: object keys sorted at every depth,undefined dropped. So these are the same request, and the second
replays rather than conflicting:
409 on a legitimate retry.

