Skip to main content Skip to content

Rate Limiting

The ZopNight API enforces per-organization rate limits at the gateway. Reference for limits, the 429 response, and best-practice backoff strategy.

3 min read Last updated: 

The ZopNight API enforces rate limits per organization to ensure fair usage and service stability.

How It Works

Rate limiting is applied at the gateway level, tracked per organization using Redis. Limits are based on the number of requests per minute.

ParameterValue
Default limit100 requests per minute per organization (each deployment can set its own value)
ScopePer organization (all users in an org share the limit)
WindowFixed 1-minute window (resets on each clock minute boundary)
Per-endpoint variationsEvery org-scoped endpoint shares the same bucket. The few exceptions are listed under Other limits.
Response headersNo X-RateLimit-* headers are returned. The per-org 429 has no Retry-After header either. Rely on the 429 response.
Auth endpoints/auth/* is not rate limited. /oauth/* has its own per-IP limit: see Other limits.

Rate Limit Response

When the rate limit is exceeded, the API returns a 429 status:

Terminal window
HTTP 429 Too Many Requests
{
"error": "rate limit exceeded"
}

Other limits

A few routes do not use the per-org bucket. Each has its own counter, on the same fixed 1-minute window.

RouteLimit / minCounted per
/oauth/*30Caller IP
/marketplace/resolve20Caller IP
/marketplace/notifications120Caller IP
Writes to /me/* and /my/*60User
MCP server calls100User

The /oauth/* limit covers /oauth/authorize, /oauth/authorize/decision, /oauth/register, /oauth/token and /oauth/revoke. The /me/* and /my/* limit covers writes to /me/preferences, /me/profile, /my/preferences and /my/profile. Every MCP call counts, and a call over the budget is refused, reads included.

The 429 bodies:

  • /oauth/*: the OAuth slow_down error, see Error Handling.
  • /marketplace/*: {"error":"rate limit exceeded on /marketplace"}
  • /me/* and /my/*: {"error":"rate limit exceeded"}
  • MCP: {"error":"rate limit exceeded","code":"rate_limited"}

The /oauth/*, /marketplace/* and MCP 429s send a Retry-After header. Its value is the number of seconds until the current minute window ends (1 to 60).

Best Practices

  • Honour Retry-After: when a 429 carries this header, wait that many seconds before retrying.
  • Implement exponential backoff: when you receive a 429 response, wait before retrying. Double the wait time with each retry (1s, 2s, 4s, etc.).
  • Cache responses: avoid redundant API calls by caching resource lists, schedules, and other data that changes infrequently.
  • Use batch endpoints: fetch multiple resources with /resources/by-ids instead of individual GET requests.
  • Avoid polling: use reasonable intervals when polling for action status or refresh completion.
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·