Default Rate Limits
Rate limits are applied per authentication method over a 60-second window:API Key
120 requests per 60 seconds
OAuth Client
500 requests per 60 seconds
Access Token
500 requests per 60 seconds
Unauthenticated (IP)
120 requests per 60 seconds
Rate Limit Headers
Every API response includes rate limit information in the headers:Header Description
| Header | Description |
|---|---|
X-RateLimit-Limit-{Name} | Maximum requests allowed in the time window |
X-RateLimit-Remaining-{Name} | Requests remaining in current window |
X-RateLimit-Reset-{Name} | Unix timestamp when the rate limit resets |
Example Response Headers
Rate Limit Tiers
Rate limits are tracked separately for each authentication method:API Key Rate Limit
Identifier:api_key_{hashed_key}
- Limit: 120 requests
- TTL: 60 seconds
- Block Duration: 60 seconds
OAuth Client Rate Limit
Identifier:oauth_client_{hashed_client_id}
When using the X-Cal-Client-ID header:
- Limit: 500 requests
- TTL: 60 seconds
- Block Duration: 60 seconds
Access Token Rate Limit
Identifier:access_token_{hashed_token}
When using OAuth access tokens:
- Limit: 500 requests
- TTL: 60 seconds
- Block Duration: 60 seconds
IP-Based Rate Limit
Identifier:ip_{hashed_ip}
For unauthenticated requests or as a fallback:
- Limit: 120 requests
- TTL: 60 seconds
- Block Duration: 60 seconds
Custom Rate Limits
Certain API keys can have custom rate limits configured. When custom limits are applied, you’ll see additional headers:Custom Rate Limit Example
An API key with multiple rate limit tiers:- 120 requests per minute (default tier)
- 10 requests per second (burst tier)
Endpoint-Specific Rate Limits
Some endpoints may have custom rate limits using the@Throttle decorator:
Rate Limit Exceeded
When you exceed the rate limit, you’ll receive a429 Too Many Requests response:
Retry-After header indicates how many seconds to wait before retrying.
Rate Limit Storage
Rate limits are tracked using Redis with the following storage pattern:Example Keys
Best Practices
Monitor Rate Limit Headers
Monitor Rate Limit Headers
Always check
X-RateLimit-Remaining headers to track your usage:Implement Exponential Backoff
Implement Exponential Backoff
When you receive a 429 response, implement exponential backoff:
Use OAuth for Higher Limits
Use OAuth for Higher Limits
OAuth clients and access tokens have higher rate limits (500 vs 120 requests per minute):
- Use API keys for low-volume integrations
- Use OAuth for production applications with higher traffic
- Consider OAuth for applications with multiple users
Cache API Responses
Cache API Responses
Reduce API calls by caching responses:
Batch Requests When Possible
Batch Requests When Possible
Instead of making multiple requests, use list endpoints with filters:
Rate Limit Implementation
The Platform API uses a custom throttler guard (CustomThrottlerGuard) that:
- Identifies the request source (API key, OAuth client, access token, or IP)
- Retrieves rate limits from database or uses defaults
- Tracks request count in Redis
- Applies multiple rate limit tiers (default + custom)
- Blocks requests when any limit is exceeded
- Returns headers with current rate limit status
Implementation Details
Webhook Rate Limits
Webhook deliveries are not subject to the same rate limits, but they have their own delivery constraints:- Maximum of 5 delivery attempts per webhook event
- Exponential backoff between retries (1s, 2s, 4s, 8s, 16s)
- 30-second timeout per delivery attempt
Environment Variables
Rate limits can be configured via environment variables:Upgrading Rate Limits
For enterprise customers or high-volume applications, custom rate limits can be configured:- Contact [email protected]
- Discuss your usage requirements
- Receive custom API key with higher limits
- Custom limits are stored in the database and cached in Redis
Example Custom Configuration
Enterprise API key with custom limits:- 1,000 requests per minute
- 50 requests per second
- 100,000 requests per day
Testing Rate Limits
Test your rate limit handling:Monitoring Rate Limits
Track your API usage with monitoring:Next Steps
Authentication
Learn about authentication methods
Webhooks
Set up event notifications
Best Practices
Optimize your API usage
Error Handling
Handle rate limit errors