Limits are counted per token, per minute. They keep one busy tool from slowing down everyone else.
The limits
Token | Reads (GET) | Writes (POST, PUT, PATCH, DELETE) |
|---|
Live (sk_live_, sk_agency_live_) | 120 a minute | 30 a minute |
Test (sk_test_, sk_agency_test_) | 30 a minute | 10 a minute |
Each area of the API has its own allowance. Reading 120 contacts a minute does not use up your allowance for conversations.
An agency token gets a separate allowance for each account it works on.
There is also a looser limit per internet address (600 requests a minute, counted before the token is checked), so repeated bad tokens from one address are cut off quickly.
Open-time lookups cost one request per day
GET /api/v1/calendars/availability can answer up to 31 days at once, and each day in the range counts as one read. A 7-day question uses 7 of your 120. A range larger than your whole allowance is refused with 400 VALIDATION_ERROR and tells you the largest range the token can ask for (30 days on a test token).
Every response tells you where you stand:
Header | Meaning |
|---|
X-RateLimit-Limit
| Your allowance for this kind of request, per minute. |
X-RateLimit-Remaining
| How many are left in the current minute. |
X-RateLimit-Reset
| When the minute resets, as a Unix time in seconds. |
When you hit the limit
You get 429 Too Many Requests with a Retry-After header saying how many seconds to wait:
HTTP/1.1 429 Too Many Requests
Retry-After: 12
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1774621260
{ "error": { "code": "RATE_LIMITED", "message": "Too many requests" } }
Wait the number of seconds in Retry-After, then try again.
Tips to stay under the limits
Use webhooks to hear about changes instead of asking every few seconds.
Ask for bigger pages (up to 100 items) instead of many small ones.
Look a contact up by email or phone instead of listing everyone.
Retry only 429 and 5xx responses, and wait a little longer after each failed try.