AMS Docs

Rate Limits

Rate limiting protects the AMS API infrastructure from abuse, ensures fair resource allocation across all tenants, and maintains consistent performance for all users. Limits are enforced at multiple levels: per-user, per-IP, and per-tenant.

Rate Limits by Endpoint Type

Endpoint TypeLimitWindowScope
Authenticated API (general)60 requestsper minuteper user token
Guest / Public API10 requestsper minuteper IP address
Login endpoint5 attemptsper minuteper IP address
File uploads20 requestsper minuteper user
AI endpoints10 requestsper minuteper tenant
Bulk import5 requestsper hourper user
Webhook creation10 requestsper hourper tenant
Report generation20 requestsper hourper user
ℹ️ Enterprise PlansEnterprise plan tenants can request increased rate limits via the Super Admin panel under Settings → API → Rate Limit Overrides. Custom limits are available for specific endpoint types.

Rate Limit Response Headers

Every API response includes rate limit headers so you can monitor your usage and adapt proactively:

HeaderDescription
X-RateLimit-LimitTotal requests allowed in the current window
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the current window resets
Retry-AfterSeconds to wait before retrying (only present on 429 responses)
http — example response headers
HTTP/1.1 200 OK
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 47
X-RateLimit-Reset: 1741954860
Content-Type: application/json

Handling 429 Errors

When you exceed the rate limit, the API returns HTTP 429 Too Many Requests with a Retry-After header indicating how many seconds to wait:

http — 429 response
HTTP/1.1 429 Too Many Requests
Retry-After: 14
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1741954860
Content-Type: application/json

{
  "message": "Too Many Requests. Please wait 14 seconds before retrying.",
  "retry_after": 14
}

Retry Strategy with Exponential Backoff

When building integrations, implement an exponential backoff strategy to gracefully handle rate limit errors:

javascript — retry with backoff
async function fetchWithRetry(url, options, maxRetries = 3) {
  for (let attempt = 0; attempt <= maxRetries; attempt++) {
    const response = await fetch(url, options);

    if (response.status !== 429) {
      return response;
    }

    if (attempt === maxRetries) {
      throw new Error('Rate limit exceeded after max retries');
    }

    // Honour Retry-After header, fallback to exponential backoff
    const retryAfter = response.headers.get('Retry-After');
    const delay = retryAfter
      ? parseInt(retryAfter) * 1000
      : Math.pow(2, attempt) * 1000;

    await new Promise(resolve => setTimeout(resolve, delay));
  }
}
python — retry with backoff
import time
import requests

def fetch_with_retry(url, headers, max_retries=3):
    for attempt in range(max_retries + 1):
        response = requests.get(url, headers=headers)

        if response.status_code != 429:
            return response

        if attempt == max_retries:
            raise Exception("Rate limit exceeded after max retries")

        retry_after = response.headers.get("Retry-After")
        delay = int(retry_after) if retry_after else (2 ** attempt)
        time.sleep(delay)

Best Practices