Idempotency

Sometimes the same request gets sent more than once: a user clicks twice, a background job runs again, or your application retries after a connection drops or a request times out.

For an operation that creates or changes something, repeating the request could mean doing the work twice—for example, creating two cards when you intended to create one.

Idempotency makes repeated attempts count as one intended operation. By sending the same idempotency key with each attempt, you give the API a way to recognize a duplicate and return the existing result rather than perform the operation again.

Send an idempotency key

For endpoints that require it, include idempotencyKey in the request body alongside the other required fields.

Generate a unique value, such as a UUID, for each operation you intend to perform. Save it before sending the request so you can reuse it if you need to retry.

An idempotency key identifies an operation. It is separate from the API key used to authenticate your request.

Retry the same operation

Keep the same API key, endpoint, target resource, request body, and idempotency key when retrying.

SituationWhat happens
The operation already succeeded.The API returns the associated resource instead of repeating the write.
The key was used with different request data.The API returns 409 Conflict.
A request with the same key is still running.The API can return 409 Conflict. Wait before retrying, following any delay provided in the response.

A replay may return the resource’s current state rather than an exact copy of the original response. Check the endpoint documentation for any values returned only on the first request.

Start a new operation

Use a new idempotency key when you intend to perform a separate operation, even if its request data is identical.

Do not generate a new key simply because a request timed out. The original request may already have succeeded, and a new key could create a duplicate.

Each endpoint documents its idempotency requirements and any operation-specific retry behavior.