v1.0 • Lead Management
Understanding request limits and managing API usage
All API keys have the same generous limits
Understanding the sliding window approach
Each API key gets its own 1,000 requests per hour limit, regardless of how many keys you have.
The limit resets continuously, not at fixed hours. It tracks requests made in the last 60 minutes.
Your API key can be used from any IP address without additional restrictions.
Every API response includes rate limit information
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 653
X-RateLimit-Reset: 1640995200
X-RateLimit-Used: 347X-RateLimit-LimitMaximum requests allowed per hour (always 1000)
X-RateLimit-RemainingNumber of requests remaining in current window
X-RateLimit-ResetUnix timestamp when the oldest request expires
X-RateLimit-UsedNumber of requests used in current window
const response = await fetch('https://your-domain.com/api/v1/leads', {
headers: {
'Authorization': 'Bearer sk-workspace_your_key',
'Content-Type': 'application/json'
}
});
// Check rate limit headers
const limit = response.headers.get('X-RateLimit-Limit');
const remaining = response.headers.get('X-RateLimit-Remaining');
const reset = response.headers.get('X-RateLimit-Reset');
console.log(`Resets at: ${new Date(reset * 1000)}`);How to handle 429 responses gracefully
HTTP/1.1 429 Too Many Requests
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1640995800
Retry-After: 600
{
"success": false,
"error": "Rate limit exceeded",
"code": "RATE_LIMIT_EXCEEDED",
"details": {
"limit": 1000,
"remaining": 0,
"resetTime": 1640995800,
"retryAfter": 600
}
}Always check X-RateLimit-Remaining
Wait and retry when hitting limits
Combine multiple operations when possible
This can lead to temporary blocks
Wait for the reset time
Don't use multiple keys to bypass limits
async function makeRequestWithRetry(url, options, maxRetries = 3) {
for (let attempt = 0; attempt <= maxRetries; attempt++) {
const response = await fetch(url, options);
if (response.status === 429) {
const retryAfter = response.headers.get('Retry-After');
const waitTime = retryAfter ? parseInt(retryAfter) * 1000 : 60000;
if (attempt < maxRetries) {
await new Promise(resolve => setTimeout(resolve, waitTime));
continue;
}
}
return response;
}
throw new Error('Max retries exceeded');
}Track your API usage and optimize requests
View detailed usage statistics for all your API keys in the workspace dashboard.
View DashboardNow you know how to work within rate limits. Ready to explore the API endpoints and start building?