Idempotency
EveryPOST endpoint that has side effects accepts an Idempotency-Key header. Replays with the same key and the same payload return the original response without re-running the side effect.
How it works
- Generate a UUID v4 client-side. Use it once.
- Send it in the
Idempotency-Keyheader: - The server stores the request payload hash + the eventual response in Redis with a 24-hour TTL keyed by the idempotency key.
- Subsequent identical requests return the stored response.
- A request with the SAME key but a DIFFERENT payload returns
409 IDEMPOTENCY_KEY_REUSED.
Which endpoints support it
Any endpoint whose reference page listsIdempotency-Key in the headers table. As a rule of thumb: anything that creates a resource (POST), charges money, sends an email, or fires a notification.
Client recommendations
- Use a fresh UUID per logical action — never reuse one across actions.
- Retry on 5xx and network errors with the same key; the server will dedupe.
- Treat
409 IDEMPOTENCY_KEY_REUSEDas a programming bug, not a user-facing error.