Rate Limits
The Texting Blue API enforces rate limits to ensure fair usage and platform stability. Limits vary by plan.
Limits per plan
| Scope | Free | Starter | Pro | Enterprise |
|---|---|---|---|---|
| API requests/min | 60 | 300 | 1,000 | 5,000 |
| Messages/min | 5 | 20 | 60 | 200 |
| Monthly messages | 100 | 1,000 | 10,000 | Custom |
| Phone numbers | 1 | 2 | 5 | Unlimited |
| Team members | 1 | 3 | 10 | Unlimited |
Rate limit headers
Every API response includes rate limit information in the headers:
| Header | Description |
|---|---|
x-ratelimit-remaining | Number of requests remaining in the current window |
Retry-After | Seconds to wait before retrying (only present on 429 responses) |
Handling rate limits
When you exceed the rate limit, the API returns a 429 Too Many Requests response:
{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded. Retry after 15 seconds."
}
}
Best practices
Implement exponential backoff:
async function sendWithRetry(payload, maxRetries = 3) {
for (let attempt = 0; attempt < maxRetries; attempt++) {
const response = await fetch('https://api.texting.blue/v1/messages/send', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': API_KEY,
},
body: JSON.stringify(payload),
});
if (response.status === 429) {
const retryAfter = parseInt(response.headers.get('Retry-After') || '10');
await new Promise(resolve => setTimeout(resolve, retryAfter * 1000));
continue;
}
return response.json();
}
throw new Error('Max retries exceeded');
}
Queue messages client-side:
If you're sending many messages, queue them and send at a controlled rate rather than bursting:
async function sendBatch(messages, delayMs = 1000) {
for (const msg of messages) {
await sendMessage(msg);
await new Promise(resolve => setTimeout(resolve, delayMs));
}
}
Monitor remaining requests:
Check the x-ratelimit-remaining header and slow down as you approach the limit.
Monthly message limits
Monthly message limits are enforced separately from per-minute rate limits. When you reach your monthly limit, the API returns a 402 Payment Required response with the plan_limit_exceeded error code.
Monthly limits reset at the start of each billing cycle.
Requesting higher limits
Enterprise plan customers can request custom rate limits. Contact support@texting.blue to discuss your needs.
Next steps
- Error codes -- Full error reference
- Pricing -- Compare plan limits