[ Concepts ]
Understanding idempotency
Every write requires one UUID per logical operation.
Every write to AgentCents requires an Idempotency-Key header — a UUID you generate once per logical expense. It is required, not optional.
Why it matters
Agents retry after network blips and timeouts. Reusing the same key returns the exact same expense instead of adding a duplicate.
How to use it
Generate one UUID before making the request. Retry uncertainty with the same key. Use a new key for a genuinely separate expense.
Idempotency-Key: 7c9e6679-7425-40de-944b-e07fc1f90ae7Requests are deduplicated for 24 hours.
What happens on a conflict
Reusing a key with a different request body returns 409 idempotency_conflict. Use a new key for anything actually different.