Skip to main content

Rate Limiting

Every endpoint shares one API-wide limit: 1000 requests per 10 seconds per API credential. Some endpoints also have a limit of their own. A request has to fit both.

The API-wide limit

“Per API credential” means per access token or per Restricted Access Token. Every endpoint counts into the same allowance, so 600 list calls and 400 detail calls in one window use it up. A request that sends both an Authorization bearer token and an x-restricted-access-token counts against both. The limit is there to stop a client stuck in a loop, not to ration normal use. It sits far above what any integration sends today.

Endpoint limits

These apply on top of the API-wide limit, each counted on its own.
Cache your token. The token endpoint’s allowance is four requests per window, and tokens are valid for 60 minutes. A client that fetches a fresh token per API call will start receiving 429s within seconds. Request a new one only when the current one is close to expiring.

What each limit is counted against

Per organization

The organization limits are counted against your organization, not your IP address. Two consequences, both intentional:
  • Several servers sharing one Turris organization share one allowance. Scaling your fleet horizontally does not multiply your quota.
  • Several organizations behind one corporate NAT do not throttle each other.

The token and webhook-test limits

These two are counted per Turris load balancer node, not per caller. Your requests can reach several nodes and other callers can reach the same node, so treat the numbers as a ceiling you should stay well under rather than a budget to plan against: cache your token for its full 60 minutes, and send test webhooks by hand.

Endpoint limits are per endpoint, not per surface

The endpoint is part of what an endpoint limit is counted against, so each endpoint carries its own 120 or its own 30. Listing producers does not consume the allowance for listing documents. That is deliberate: the failure a write limit guards against is a runaway loop against one endpoint, which a per-endpoint bucket catches exactly as well as a shared one, while a shared bucket would let a bulk producer import starve an unrelated document upload. The API-wide limit is the shared bucket, and it is set high enough not to do that.

Response headers

The API-wide limit sends no X-RateLimit-* headers, and a 429 carries only Retry-After.

When you exceed a limit

The message says which limit was hit; an endpoint limit answers ThrottlerException: Too Many Requests. Branch on errorType, never on the message text.

Retry strategy

Read Retry-After when it is present and wait that long. Fall back to exponential backoff when it is not.
A 429 from a rate limit means the request was refused before it ran, so nothing was processed. For writes, still send the same Idempotency-Key on every retry: it is what makes a retry after a timeout or a 5xx safe. See Idempotency.

If a limit is wrong for your integration

These numbers are sized for interactive and scheduled use, not for a bulk backfill. If you have a legitimate case that does not fit, such as a one-off migration or a nightly full sync of a large group, tell us at support@turrisfi.com rather than working around it with parallel credentials.