# idempotency_key_reused — Shorty API error

> Idempotency key reused (HTTP 422): when the Shorty API returns the idempotency_key_reused error, why, and how to fix it.

| Code | HTTP status | Type URI |
| --- | --- | --- |
| `idempotency_key_reused` | 422 | `https://aishorty.com/docs/api/errors/idempotency_key_reused` |

## When it happens

An `Idempotency-Key` was reused with a DIFFERENT request body. Keys bind to the exact payload they first succeeded with.

## Example response

```json
{
  "type": "https://aishorty.com/docs/api/errors/idempotency_key_reused",
  "title": "Idempotency key reused",
  "status": 422,
  "detail": "This idempotency key was already used with a different request body.",
  "instance": "urn:request:req_01J9Z8ABCDEFGH0123456789",
  "code": "idempotency_key_reused",
  "request_id": "req_01J9Z8ABCDEFGH0123456789"
}
```

## How to fix it

Generate a new key when the body changes. Reuse a key only for byte-identical retries of the same operation.

## Related errors

- [idempotency_conflict](/docs/api/errors/idempotency_conflict) — Idempotency conflict (HTTP 409)
- [idempotency_in_progress](/docs/api/errors/idempotency_in_progress) — Idempotency request in progress (HTTP 409)
