Idempotency
Network failures happen. To retry a POST safely, send an Idempotency-Key header with a unique value, such as a UUID:
Idempotency-Key: 4f9a8c52-3c1e-4b7a-9d0e-2a6b5f1c7e33- A repeat with the same key within 24 hours returns the original response, including the original status code, and is not billed again.
- Reusing a key with a different request body returns
409 idempotency_key_reused. - Keys are scoped to the API key that sent them.
- If the first request is still in progress, the retry waits for it to finish.
Generate a new key for each logical operation, store it with the operation in your system, and reuse it for every retry of that operation.