Rate Limits
To ensure high performance and reliability for all users, SMSBAT applies rate limiting to API requests. Rate limits specify the maximum number of API calls you can make within a given time frame.
Default Limits
Unless otherwise specified in your contract, the default rate limits below apply to the SMSBAT API (api.smsbat.com) and the ChatHub API. The Cascade API (restapi.smsbat.com) has no request-rate limit; see the section at the end of this page.
| API Category | Default Limit | Burst Limit |
|---|---|---|
Messaging Endpoints (/bat/messagelist) | 100 requests / second | 150 requests / second |
| Data Endpoints (Status, Balance, Info) | 50 requests / second | 75 requests / second |
[!NOTE] For outbound messaging (e.g.,
POST /bat/messagelist), one HTTP request can contain up to 5,000 messages in themessagesarray. The rate limit applies to the number of HTTP requests, not the number of messages sent.
Handling Rate Limits
If you exceed the allowed rate limit, the API will respond with an HTTP 429 Too Many Requests status code.
Response Example
{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Please wait before sending more requests.",
"status": 429
}
Best Practices
To avoid being rate-limited, consider the following best practices:
- Batch Your Messages: Instead of sending 1,000 separate HTTP requests for 1,000 SMS messages, send a single request containing an array of 1,000 objects.
- Implement Exponential Backoff: If you receive a
429status code, wait for a short period (e.g., 1 second), and try again. If it fails again, double the wait time (2s, 4s, 8s, etc.). - Pace Your Requests: If you are running an automated script that triggers thousands of API calls, introduce a small delay (e.g.,
sleep(10)milliseconds) between requests.
Requesting a Limit Increase
If your use case requires a higher throughput than the default limits, you can request an increase.
- Contact your dedicated account manager or email help@smsbat.com.
- Provide your Account ID and the expected throughput (e.g., 500 requests per second).
- Briefly describe your use case.
Our technical team will review your request and adjust your limits accordingly.
Cascade API
The Cascade API (https://restapi.smsbat.com/api/CascadeMessage/...) is not rate-limited per second or per minute. Its limits are:
| Limit | Value |
|---|---|
| Request body size | 10 MB |
| Messages per request | Not validated; the body size is the only limit |
| Requests per second / minute | No limit |
Batch your messages into arrays instead of sending one request per message. See Send Cascade Messages.