Preview documentation. The interface is being rolled out — examples are indicative, and we will confirm final values at launch.
Idempotency, replay, source version
Mutations (POST, PATCH, DELETE) support idempotency so you can safely
retry after a network error without creating a duplicate. Include an
Idempotency-Key header on every mutation — preferably a random UUID v4.
How Idempotency-Key works
The idempotency key scope is determined by four elements:
- integration (your API key),
- HTTP method,
- canonical path,
Idempotency-Keyvalue.
The same combination identifies one operation. The server stores the first successful response and returns it on repeats.
| Scenario | Behavior |
|---|---|
| Same key + same body hash | Identical stored response returned (replay) |
| Same key + different body hash | 409 idempotency_key_reused — conflict |
| New key | New operation executed |
Practical rule: when retrying, send exactly the same body with the same
Idempotency-Key. If you change content but keep the old key, you get a
conflict instead of a new write.
Source version and stale conflict
For resources updated multiple times (e.g. product, customer), source_version
applies — a monotonic version counter on the source side (your store). On write
we compare the sent version with the last known one:
| Version relation | Behavior |
|---|---|
| Version newer than stored | Update accepted |
| Version older than stored | 409 stale_source_version — rejected |
| Identical version | Replay — current state returned unchanged |
This prevents a late or reordered request from overwriting fresher data. Set
source_version to an increasing value on every store change (e.g. millisecond
timestamp or your own event counter).
Stored response retention
The response stored for an Idempotency-Key is kept for 7 days. A retry
within that window returns the same result. After retention, the same key may be
treated as a new operation — do not rely on idempotency for retries more than a
week apart.
Safe retry patterns
- Generate the key once per operation — persist
Idempotency-Keybefore sending; use the same value on retry. - Retry with backoff — for
429 rate_limitedand503 tenant_unavailable, wait (seeRetry-After) and repeat with the same key. - Do not change body on retry — changing content with the same key yields
409 idempotency_key_reused. - Handle 409 deliberately —
idempotency_key_reusedmeans body mismatch;stale_source_versionmeans you have a stale resource version; fetch current state before retrying.
Full code meanings are in Errors. Request signing is in Authentication.