> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tickable.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Idempotent requests

> Retry POST requests safely without doing the same thing twice

A network error does not tell you whether your request arrived. Send an `Idempotency-Key` header with any `POST` request and you can simply retry it: Tickable runs it once and returns the stored first response for every retry with the same key.

```bash theme={null}
curl -X POST https://api.tickable.io/tickets/c3d4e5f6-7890-4a1b-2c3d-4e5f6a7b8c9d/scan \
  -H "Authorization: Bearer tk_live_YOUR_API_KEY" \
  -H "Idempotency-Key: 6f1c2a9e-scan-door-1" \
  -H "Content-Type: application/json" \
  -d '{}'
```

Without it, retrying a scan would report the ticket as already scanned, and retrying a webhook creation would create a second webhook.

* Use a random value per operation, such as a UUID, at most 255 characters.
* Keys are kept for 24 hours and belong to your organization.
* A replayed response has the header `Idempotent-Replayed: true`.
* Reusing a key with a different body or path returns `400` with code `idempotency_key_reused`.
* A retry while the first request is still running returns `409` with code `idempotency_request_in_progress`; wait a moment and try again.
* `5xx` responses are not stored, so retrying after a server error runs the request again.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.