Understanding and managing API request limits for optimal performance
To ensure fair usage and maintain service quality, CX Tools implements rate limiting on API requests. Rate limits vary by endpoint and subscription tier.
X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 999 X-RateLimit-Reset: 1640995200
These headers are included in every API response to help you track your usage and adapt your request frequency accordingly.
Plan | Requests/Min | Daily Limit | Burst Limit |
---|---|---|---|
Free | 60 | 1,000 | 100 |
Pro | 300 | 10,000 | 500 |
Enterprise | Custom | Custom | Custom |
When you exceed the rate limit, our API will return a 429 status code with details about when you can retry:
HTTP/1.1 429 Too Many Requests { "error": "Rate limit exceeded", "reset_at": "2024-01-22T10:00:00Z" }
async function makeRequest() { try { const response = await fetch('/api/endpoint', { headers: { 'Authorization': 'Bearer API_KEY' } }); // Check remaining rate limit const remaining = response.headers.get('X-RateLimit-Remaining'); if (remaining < 10) { // Consider implementing backoff } return await response.json(); } catch (error) { if (error.status === 429) { // Handle rate limit const resetTime = error.headers.get('X-RateLimit-Reset'); await sleep(calculateBackoff(resetTime)); return makeRequest(); } throw error; } }
Some endpoints have their own specific rate limits in addition to the global limits above:
Endpoint | Free Plan | Pro Plan |
---|---|---|
/api/calendar/status | 300/day | 5,000/day |
/api/grxml/validate | 100/day | 2,000/day |
/api/studio/backup | 50/day | 1,000/day |
Now that you understand our rate limits, explore the available API endpoints or upgrade your plan for higher limits.