SparrowDesk

Rate Limit

Rate limit for the SparrowDesk REST API

The SparrowDesk REST API rate-limits every endpoint.

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 window
  • x-ratelimit-minute-remaining: The number of requests remaining within the minute window
  • x-ratelimit-minute-reset: The timestamp when the minute rate limit will be reset
  • x-ratelimit-day-limit: The maximum number of requests allowed within the day window
  • x-ratelimit-day-remaining: The number of requests remaining within the day window
  • x-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

  1. Batch Operations: Use bulk endpoints when available to reduce the number of individual API calls.

  2. Cache Responses: Cache frequently accessed data to minimize unnecessary API requests.

  3. Distribute Requests: Spread your API calls evenly over time rather than making bursts of requests.

  4. Handle Errors Gracefully: Implement proper error handling for rate limit responses.