Skip to main content

Idempotency

For POST requests that create resources or perform billable actions, you can send an Idempotency-Key header so retries return the same HTTP status and JSON body as the first successful response for that key.

Behavior

  • Scope: Idempotency keys are scoped to your organization (derived from the API key).
  • Body matching: Reusing the same key with a different JSON body returns invalid_request_error / idempotency_mismatch (400).
  • Concurrent retries: While the original request is still running, duplicates may receive 409 / idempotency_conflict.
  • TTL: Cached responses expire after roughly 24 hours, after which keys behave like fresh requests again.

Supported routes

Include Idempotency-Key on these endpoints when you need safe retries: Hang-up and similar POSTs do not honor Idempotency-Key—ensure your caller treats duplicates safely when you retry.