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 Type | Limit | Window | Scope |
|---|---|---|---|
| Authenticated API (general) | 60 requests | per minute | per user token |
| Guest / Public API | 10 requests | per minute | per IP address |
| Login endpoint | 5 attempts | per minute | per IP address |
| File uploads | 20 requests | per minute | per user |
| AI endpoints | 10 requests | per minute | per tenant |
| Bulk import | 5 requests | per hour | per user |
| Webhook creation | 10 requests | per hour | per tenant |
| Report generation | 20 requests | per hour | per 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:
| Header | Description |
|---|---|
X-RateLimit-Limit | Total requests allowed in the current window |
X-RateLimit-Remaining | Requests remaining in the current window |
X-RateLimit-Reset | Unix timestamp when the current window resets |
Retry-After | Seconds 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
- Cache responses — Cache API responses locally where data doesn't change frequently (e.g. member types, event lists) to reduce request volume.
- Use webhooks — Subscribe to webhook events instead of polling endpoints repeatedly.
- Batch operations — Use bulk endpoints (e.g.
POST /api/v1/members/import) instead of individual create calls in loops. - Monitor headers — Check
X-RateLimit-Remainingproactively and slow down requests when approaching the limit. - Spread requests — For background sync jobs, spread requests evenly over time rather than bursting at the window start.