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

# Idempotency

> Retry write requests without duplicating side effects.

For retryable mutations, send an idempotency key.

```bash theme={null}
curl "$FIRSTSALES_BASE_URL/api/v1/organizations/org_123/workspaces/ws_123/contacts" \
  -X POST \
  -H "Authorization: Bearer $FIRSTSALES_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: import-row-001" \
  -d '{"email":"alex@example.com"}'
```

The CLI exposes the same header:

```bash theme={null}
firstsales contacts create \
  --org org_123 \
  --workspace ws_123 \
  --data '{"email":"alex@example.com"}' \
  --idempotency-key import-row-001
```

## Rules

* Reusing the same key with the same request returns the original result.
* Reusing the same key with a different request returns an idempotency conflict.
* Use deterministic keys for imports, approvals, and lifecycle actions.
* Do not use the same idempotency key across unrelated operations.
