Send an `Idempotency-Key` header on a `POST` to retry it safely. If a network failure or timeout leaves you unsure whether a create succeeded, resend the same request with the same key: you get the original response, not a duplicate record.

The header is optional and accepted on every `POST`. A request without it behaves normally.

### Using a key

```
POST /api/v3/projects
Idempotency-Key: 4f0c2a52-8d1e-4b8a-9d57-0a6f1c9e7b21
```

-   Use a unique value per logical operation, such as a UUID v4. 1-255 printable ASCII characters.
-   On retry, send the **same key, path and body**.
-   Keys are scoped to your application and the authorizing user, so they never collide with another integration's.

### What a retry returns

Within **24 hours** of the first request, a repeat with the same key returns the first response verbatim: same status, same body, plus the header `Idempotent-Replayed: true`.

The replay is a stored copy. Later edits to the record, and a different `include` parameter, are not reflected in it.

### Errors

| Status  | `error_type`               | Meaning                                                  | What to do                               |
| ------- | -------------------------- | -------------------------------------------------------- | ---------------------------------------- |
| **400** | `HBIdempotencyKeyInvalid`  | Key is not 1-255 printable ASCII.                        | Fix the key.                             |
| **409** | `HBIdempotencyKeyInFlight` | The first request with this key is still running.        | Retry after a short backoff, same key.   |
| **422** | `HBIdempotencyKeyReused`   | The key was already used with a different path or body.  | Use a new key for a different operation. |
| **503** | `HBIdempotencyUnavailable` | Idempotency could not be checked. Nothing was processed. | Retry with backoff, same key.            |

Unlike other `409` responses, `HBIdempotencyKeyInFlight` is safe to retry. See [Errors](#tag/errors).
