Introduction
Rate Limits
Understand the SkyLight Chat API rate limits and how to handle throttling.
Rate limit policy
The SkyLight Chat API enforces a rate limit of 120 requests per minute per API key.
| Limit | Window | Scope |
|---|---|---|
| 120 requests | 1 minute | Per API key |
Rate limit headers
Every response includes headers telling you your current rate limit status:
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1741212345
| Header | Description |
|---|---|
X-RateLimit-Limit | Total requests allowed per window |
X-RateLimit-Remaining | Requests remaining in the current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
Handling 429 responses
When you exceed the rate limit, the API returns 429 Too Many Requests:
{
"success": false,
"message": "Too many requests. Please slow down.",
"retry_after": 34
}
The retry_after value is the number of seconds to wait before retrying.
Retry strategy
Implement exponential backoff with jitter for production systems:
async function requestWithRetry(fn, maxRetries = 3) {
for (let attempt = 0; attempt < maxRetries; attempt++) {
try {
return await fn()
} catch (err) {
if (err.status === 429 && attempt < maxRetries - 1) {
const delay = Math.pow(2, attempt) * 1000 + Math.random() * 500
await new Promise(resolve => setTimeout(resolve, delay))
continue
}
throw err
}
}
}
Best practices
- Batch operations where possible — fetch multiple contacts in one paginated request rather than many individual calls
- Cache responses that don't change frequently (e.g., account subscription details, available booking types)
- Use webhooks instead of polling for real-time updates — a webhook costs 0 requests per event
- Monitor
X-RateLimit-Remainingand back off proactively before hitting the limit
