Rate Limiting
The API accepts up to 300 requests per minute.
Quota headers
Every response includes:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum number of requests per minute |
X-RateLimit-Remaining | Requests left in the current window |
When you go over the limit, you get a 429 response with a Retry-After header, in seconds:
json
{
"error": "TooManyRequests",
"message": "Rate limit exceeded. Please try again later.",
"code": 429
}Handling 429s
js
async function apiCall(url, options, maxRetries = 3) {
for (let attempt = 0; attempt < maxRetries; attempt++) {
const res = await fetch(url, options)
if (res.status !== 429) return res
const retryAfter = parseInt(res.headers.get('Retry-After') || '30', 10)
await new Promise(r => setTimeout(r, retryAfter * 1000))
}
throw new Error('Max retries exceeded')
}Making fewer requests
- Use
per_page=100so lists take fewer pages. - Use the bulk endpoints (
POST /contacts/bulk-create,PUT /contacts/bulk-update,POST /blacklist/bulk-create). - Cache data that rarely changes: lists, tags, pipeline stages, templates.