# Idempotency key strategy

## Key format

- UUID v4 generated by client.
- Use one key per logical operation.

## Storage strategy

- Store the key with a request hash and response payload.
- Use a unique index on (client_id, idempotency_key).
- Return stored response for repeats with the same request hash.

## Conflict rule

- If the key exists with a different request hash, return 409.
- Log the conflict with idempotency_key and client_id.
