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

# Idempotency

> Make every write safe to retry without double-posting.

Networks fail. A request can succeed on our side while the response is lost on the way back to you —
and a naive retry would post the same journal twice. **Idempotency keys** prevent that.

## How it works

Send an `Idempotency-Key` header on any write request. It is a unique value you generate (a UUID is
ideal):

```bash theme={null}
curl --request POST \
  --url https://api.3ringscapital.co/v1/journals \
  --header 'Authorization: Bearer 3r_live_•••' \
  --header 'Idempotency-Key: a1b2c3d4-0000-4000-8000-000000000000' \
  --data '{ "businessId": "biz_9f2", "entries": [ ... ] }'
```

* The **first** request with a given key is processed normally.
* Any **replay** with the same key returns the original response — the same status and body — without
  creating a second record.

## Rules

> [!NOTE]
>
> Reuse the **same key** only for the **same request**. Generate a fresh key for each distinct
> operation; reusing a key for a different payload returns a conflict.

* Keys are scoped to your partner account and remembered for 24 hours.
* Generate one key per logical operation and persist it with your own record, so a retry after a
  crash uses the same key.
* Idempotency applies to writes (`POST`). Reads are naturally safe to repeat.


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