When it is required
Send anIdempotency-Key header on these requests:
POST /recipientsPOST /recipients/{recipient_id}/addressesPOST /deliveriesPOST /test-helpers/deliveries/{delivery_id}/transition
GET requests and quote requests do not need it.
Node.js
The rule that prevents mistakes
Use:- the same key when retrying the same HTTP method, URL, environment, and JSON body;
- a new key for a new action or any changed request body.
Retry behavior
Authentication and validation failures are not stored because no mutation was attempted. Deterministic failures after a mutation claim may be stored to prevent repeated side effects.
What a replay looks like
The JSON is the same as the original response. This response header tells you it was replayed:A safe retry checklist
Before retrying a create request, confirm that you kept all four things unchanged:- The sandbox or live base URL.
- The HTTP method and path.
- The JSON request body.
- The
Idempotency-Keyvalue.
