Skip to Content

Rate limits

The per-minute limit for each plan, the X-RateLimit headers, 429 responses, and how to retry

The API limits how many requests each organization can send per minute. The limit applies to the whole organization: every API key and OAuth app in it, across all its workspaces, shares it, and so do the add-ins and integrations that sajn publishes. A sandbox is a separate organization with a limit of its own.

The limit counts requests over the last 60 seconds, as a sliding window, and stops bursts of traffic. There's no daily cap on the number of requests. When you reach the limit, requests fail with 429 RATE_LIMITED.

Limits per plan

The limit depends on your organization's plan:

PlanRequests per minute
Team600
Enterprise2,000
Sandbox60

A sandbox always has the sandbox limit, whatever the plan of the organization that created it. An organization on Solo that kept API access when API access moved to Team has 120 requests per minute.

If sajn has agreed a custom limit with your organization, it replaces the limit of your plan. To discuss a higher limit, contact dev@sajn.se.

We recommend reading your limit from the response headers rather than hard-coding these numbers, so your client adapts when your plan changes.

Rate-limit headers

Every authenticated response from the REST API carries the following headers:

HeaderDescription
X-RateLimit-LimitYour per-minute limit.
X-RateLimit-RemainingThe requests you have left in the current minute.
X-RateLimit-ResetWhen the per-minute window resets, as a Unix timestamp in seconds.
Retry-AfterOn a 429 response only. The number of seconds to wait before you retry.

For example, a Team organization's response has headers similar to the following:

X-RateLimit-Limit: 600
X-RateLimit-Remaining: 598
X-RateLimit-Reset: 1790841660

Limit responses

A request over the limit returns an HTTP 429 Too Many Requests status code, a Retry-After header, and the usual error body with the code RATE_LIMITED. In API version 2026-09, the code is TOO_MANY_REQUESTS.

{
  "code": "RATE_LIMITED",
  "message": "API rate limit exceeded",
  "userMessage": "För många förfrågningar. Försök igen om en stund.",
  "requestId": "req_V1StGXR8Z5jdHi6BmyT2"
}

Retry with backoff

How to retry depends on the error:

  • 429 RATE_LIMITED: wait the number of seconds in Retry-After, and then retry. It's usually a few seconds.
  • 500 INTERNAL_ERROR, 503 UPSTREAM_UNAVAILABLE, and network errors: retry with exponential backoff and jitter.

To make a retried write request safe, send the same Idempotency-Key header on every attempt. For more information, see Idempotency.

The following samples retry a request up to five times:

# --retry honors Retry-After on a 429 response.
curl --retry 5 --retry-max-time 120 \
  https://app.sajn.se/api/v1/documents \
  -H "Authorization: Bearer $SAJN_API_KEY" \
  -H "Sajn-Version: 2026-10"

The Node.js and Python samples return the last response when they give up, so your code can still read its code and requestId.

Stay within the limits

To use fewer requests:

  • Subscribe to webhooks instead of polling for changes.
  • Request up to 100 items per page with limit.
  • Sync with updatedAfter so each run reads only what changed. For more information, see Sync changes incrementally.
  • Spread scheduled jobs over time instead of starting them all at the same minute.

Rate limits are separate from plan limits, such as the number of documents you can send each month. A plan limit returns 403 LIMIT_EXCEEDED, which a retry doesn't fix; see Errors.

Was this page helpful?

Last updated on