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

# idempotency_conflict

> HTTP 409 — Idempotency-Key was reused with a different request body.

|                 |                        |
| --------------- | ---------------------- |
| **HTTP status** | `409 Conflict`         |
| **Code**        | `idempotency_conflict` |
| **Retry?**      | No — pick a fresh key. |

## When this happens

You reused an `Idempotency-Key` that the server has already seen, but
the request body for the new request differs from the cached one.
Agnes treats this as a conflict so you do not silently get a stale
result.

## Example response

```json theme={null}
{
  "detail": "Idempotency-Key was reused with a different request body.",
  "code": "idempotency_conflict",
  "request_id": "5b3f6c7e-7d24-4d40-9b12-3a59c01c6e91",
  "doc_url": "https://docs.lasscyber.com/errors/idempotency_conflict"
}
```

## How to fix

1. Generate a **new** `Idempotency-Key` (UUID v4 is fine).
2. Re-send the request with the new key.

The most common cause is generating the key inside the retry loop. The
key should be generated *once outside* the loop and reused on every
retry. See [Idempotency](/api-reference/idempotency) for the full
pattern.

## Cache lifetime

Idempotency entries live **24 hours** from the first request, scoped
to your tenant. After that the key is forgotten and a request with
the same value is treated as fresh.

## SDK behaviour

| SDK        | Exception             |
| ---------- | --------------------- |
| Python     | `agnes.ConflictError` |
| TypeScript | `ConflictError`       |

SDKs auto-generate idempotency keys on retried writes when you do not
pass one explicitly, so this error is rare from SDK callers.

## Related

* [Idempotency](/api-reference/idempotency) — full pattern.
