Request formats
The API supports only JSON requests. You must specify the format using theContent-Type header.
Idempotent requests
The API supports idempotency forPOST requests to versioned endpoints, such as /2025-09/contacts. OAuth 2 endpoints and PATCH and DELETE requests ignore the Idempotency-Key header.
To make an idempotent POST request, provide an additional Idempotency-Key: <key> header. The key should be a unique value — a generated UUID is a good choice.
How it works
When a request with a new idempotency key succeeds, the API stores its response for 24 hours. If you send the same request with the same key within that period, the API returns the stored response, including its originalrequest_id, without processing the request again. The replayed response has an Idempotent-Replayed: true header.
The API stores only successful (2xx) responses, so you can retry a failed request with the same key. It also doesn’t store a response whose body isn’t UTF-8 text, such as a PDF.
If you send the same key while the first request is still being processed, the API returns 409 Conflict with the code idempotency_conflict. Wait for the first request to finish, then retry with the same key. If the first request was interrupted, the key is free again within 60 seconds.
After 24 hours, the stored response expires, and the next request with that key is processed as new.
Reuse a key only for the same request
A request that reuses a key must have the same method, path, and body as the first request. The API doesn’t compare the query string. If the request is different, the API doesn’t process it and returns422 Unprocessable Content with the code idempotency_key_reused. Use a new key for each request.
Key format and scope
A key can be up to 255 characters long. Keys aren’t case-sensitive, and the API ignores leading and trailing whitespace. A blank key, or a key longer than 255 characters, returns400 Bad Request with the code invalid_request.
Keys are scoped to the operator, to your application, to the token’s scopes, and to the staff member or connected account that authorized the token. For an Access Token, keys are scoped to that token instead of an application. Another application or Access Token, or a token with different scopes, can send the same key without getting your stored response.
If the API can’t check the key
If the API can’t check the key, it doesn’t process the request and returns503 Service Unavailable with the code idempotency_unavailable. Retry later with the same key.
Rate limiting
The API uses rate limiting to ensure fair usage and maintain performance. The default rate limit is:- 10 requests per second
- 60 requests per minute
Handling rate limits
If you exceed the rate limit, the API responds with a429 Too Many Requests status code. The response includes headers with your current rate limit status:
The error code is
too_many_requests.