Rate Limit
Rate limit for the SparrowDesk REST API
To ensure fair usage and maintain optimal performance for all users, the SparrowDesk REST API implements rate limiting on all endpoints. This guide explains the rate limits and how to handle rate limit responses.
Rate Limit Overview
Rate limits are applied per account and are measured in two time windows:
- Per Minute: Maximum number of requests allowed within a 60-second window
- Per Day: Maximum number of requests allowed within a 24-hour window
The limits may vary based on the plan you are on. To know about API limits, visit SparrowDesk Pricing.
Every requests response will contain the following headers:
x-ratelimit-minute-limit: The maximum number of requests allowed within the minute windowx-ratelimit-minute-remaining: The number of requests remaining within the minute windowx-ratelimit-minute-reset: The timestamp when the minute rate limit will be resetx-ratelimit-day-limit: The maximum number of requests allowed within the day windowx-ratelimit-day-remaining: The number of requests remaining within the day windowx-ratelimit-day-reset: The timestamp when the day rate limit will be reset
Rate Limit Exceeded
When you exceed the rate limit, the API returns a 429 status code with a JSON error response:
{
"name": "LimitExceededError",
"message": "Limit exceeded for: APIS_PER_MINUTE",
"code": 429,
"details": [
{
"name": "APIS_PER_MINUTE",
"quota": 30,
"count": 30,
"remaining": 0
}
]
}Best Practices
-
Batch Operations: Use bulk endpoints when available to reduce the number of individual API calls.
-
Cache Responses: Cache frequently accessed data to minimize unnecessary API requests.
-
Distribute Requests: Spread your API calls evenly over time rather than making bursts of requests.
-
Handle Errors Gracefully: Implement proper error handling for rate limit responses to ensure your application continues to function smoothly.