# Idempotent requests

All workspace mutations, including uploads and DELETE requests, require a UUID `Idempotency-Key`. Use a new UUID for each logical change. Repeating a successful key with the same normalized body returns its saved result (except leaving/deleting an organization, which immediately removes credential access); a different operation or body returns 409. For POST `/invoices`, the body `requestId` must equal the header. Profile name/role PATCH is naturally repeatable and does not require a retry key.

Keys are unique per user and organization and must never be reused. Retry records are retained with workspace data. Workspace locking and retry records commit with invoice changes, preventing duplicate invoice numbers and recurring schedules across concurrent requests. Provider-managed membership changes and file uploads also involve external services; a provider failure between its acceptance and the database commit may still require reconciliation. Never blindly resend an uncertain email as a new operation.

The anonymous PDF generator is separate: repeating it starts another render and does not require an idempotency key.
