Idempotency ensures that performing the same operation multiple times produces the same result as performing it once. This protects against duplicate operations when requests are retried due to timeouts or network failures.
Mutating endpoints (POST, PUT, PATCH) require the X-Idempotency-Key header. This client-generated key lets the API detect and deduplicate repeated requests.
# First attempt — times outcurl ... --header 'X-Idempotency-Key: 550e8400-...'# Retry with the same key — safe, returns original resultcurl ... --header 'X-Idempotency-Key: 550e8400-...'
Never reuse an idempotency key for a different operation. Each unique operation must have its own key.
Was this page helpful?
Assistant
Responses are generated using AI and may contain mistakes.