Rate Limits
Each API token can make 1,200 calls a minute. The limit is counted for each token on its own. Two integrations with a token each do not slow each other down.
A call over the limit returns 429 with a Retry-After header: the number of seconds to wait before the next call.
Retry-After is a whole number of seconds, not a date.
A call refused this way is not recorded in the audit log.
Retry-After: 2
{ "cause": "call_limit", "error": "too many requests with this API token; wait and try again", "error_code": "APP_API_ERR_TOO_MANY_REQUESTS"}cause says which limit refused the call:
cause | Limit | What to do |
|---|---|---|
call_limit | The token's calls a minute. | Wait Retry-After seconds and send the call again. |
send_limit | Invitation emails, below. | Wait Retry-After seconds. |
invalid_token_attempts | Failed tokens, below. | Fix the token. Retrying does not help. |
Two narrower limits
- Invitation emails. A token can send 500 invitation emails in five minutes. A send over that limit returns 429, and
Retry-Aftergives the seconds until the token may send again. - Failed tokens. When one network address keeps sending tokens that do not work, calls from that address that present an API token can be refused with 429, a valid token included. Fix the token first. Once the failing calls stop, the 429 clears within seconds. The address stays refused for as long as an automation keeps sending the bad token.
The refusal for failed tokens looks like this:
Retry-After: 2
{ "cause": "invalid_token_attempts", "error": "too many API tokens that are not valid were sent from this address; check the tokens it sends", "error_code": "APP_API_ERR_TOO_MANY_REQUESTS"}Stay under the limit
- Page with a large
limit. One call for 5,000 rows costs the same as one call for 10. - Sync only what changed. Pass
updated_sinceon the lists of organizations and registration tokens to fetch only the rows that changed. See Paging and sync. - Filter agents on the server. List agents by
agent_statusorcollection_statusto fetch only those that need attention. - Honor
Retry-After. Sleep for the seconds it gives before the next call.