Rate Limits
To ensure fair usage and platform stability, the SilentChat API enforces rate limits on all endpoints. Limits are applied per API key or authenticated user, per endpoint group, and per minute unless noted otherwise.
Limits by Endpoint Group
| Group | Limit | Window | Scope |
|---|---|---|---|
Auth (/v1/auth/*) | 10 requests | 1 minute | Per IP address |
API (all other /v1/*) | 100 requests | 1 minute | Per user / API key |
Widget (/v1/widget/*) | 30 requests | 1 minute | Per visitor session |
Enterprise plans have higher limits. Contact sales if your integration requires increased throughput.
Rate Limit Headers
Every API response includes headers that tell you the current state of your rate limit:
| Header | Description |
|---|---|
X-RateLimit-Limit | The maximum number of requests allowed in the current window. |
X-RateLimit-Remaining | The number of requests remaining in the current window. |
X-RateLimit-Reset | The Unix timestamp at which the current window resets. |
Retry-After | Only present on 429 responses. The number of seconds to wait before retrying. |
Example Response Headers
HTTP/1.1 200 OKX-RateLimit-Limit: 100X-RateLimit-Remaining: 87Content-Type: application/json
Handling 429 Too Many Requests
When you receive a 429 response the API includes a Retry-After header indicating how many seconds to wait before making another request. Do not retry immediately — doing so will not succeed and may extend the backoff.
HTTP/1.1 429 Too Many RequestsRetry-After: 23Content-Type: application/json{"error": {"code": "RATE_LIMITED","message": "Too many requests. Please retry after 23 seconds.","status": 429}}
Recommended Retry Strategy
- Read the Retry-After header from the 429 response.
- Wait for the indicated number of seconds.
- Add a small random jitter (0–1 s) to avoid thundering-herd problems when many clients reset at the same time.
- Retry the request once. If you receive another 429, apply exponential backoff.
Example (JavaScript)
async function fetchWithRetry(url, options, maxRetries = 3) {for (let attempt = 0; attempt <= maxRetries; attempt++) {const response = await fetch(url, options);if (response.status !== 429) {return response;}const retryAfter = parseInt(response.headers.get('Retry-After') || '5', 10);const delay = Math.min(retryAfter * 1000 * Math.pow(2, attempt), 60000);console.warn(`Rate limited. Retrying in ${delay / 1000}s...`);await new Promise((resolve) => setTimeout(resolve, delay));}throw new Error('Max retries exceeded');}
Best Practices
- Cache responses where possible to reduce the number of API calls.
- Use webhooks instead of polling for real-time updates.
- Batch operations when the API supports it (e.g. bulk contact import).
- Monitor your X-RateLimit-Remaining header and slow down proactively as you approach the limit.
- Distribute requests evenly over time rather than sending bursts.