Rate Limiting
All Torvus Security API endpoints are rate-limited to ensure fair usage and system stability. Rate limits vary by plan and endpoint type.
Rate Limit Headers
Every API response includes rate limit headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1696857600
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in current window |
X-RateLimit-Remaining | Requests remaining in current window |
X-RateLimit-Reset | Unix timestamp when limit resets |
Rate Limits by Plan
| Plan | Requests/Minute | Requests/Hour | Requests/Day |
|---|---|---|---|
| Free | 60 | 1,000 | 10,000 |
| Professional | 300 | 10,000 | 100,000 |
| Business | 1,000 | 50,000 | 500,000 |
| Enterprise | Custom | Custom | Custom |
Rate Limits by Endpoint Type
| Endpoint Type | Free | Professional | Business |
|---|---|---|---|
| Read (GET) | 60/min | 300/min | 1,000/min |
| Write (POST/PATCH) | 20/min | 100/min | 500/min |
| Delete | 10/min | 50/min | 200/min |
| Uploads | 5/min | 20/min | 100/min |
Handling Rate Limits
When Rate Limited (429 Response)
{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded",
"retry_after": 60
}
}
Recommended Actions:
- Wait for
retry_afterseconds - Implement exponential backoff
- Cache responses when possible
- Batch requests
Example: Exponential Backoff
async function apiRequest(url, options, retries = 3) {
try {
const response = await fetch(url, options);
if (response.status === 429) {
const retryAfter = response.headers.get('Retry-After') || 60;
if (retries > 0) {
await new Promise(resolve => setTimeout(resolve, retryAfter * 1000));
return apiRequest(url, options, retries - 1);
}
}
return response;
} catch (error) {
throw error;
}
}
Best Practices
- Monitor Headers: Check
X-RateLimit-Remainingbefore making requests - Implement Caching: Cache GET responses for frequently accessed data
- Batch Operations: Use bulk endpoints when available
- Use Webhooks: Subscribe to webhooks instead of polling
- Upgrade Plan: Contact sales for higher limits
Last Updated: October 8, 2025