Get started
Rate limits
Each API token has three limits per minute: one for reads, one for writes and one for purchases.
Limits
| Bucket | Limit | Calls |
|---|---|---|
| Read | 300 per minute | Every GET, plus the look-ups that change nothing: POST /domains/availability, POST /domains/suggestions, POST /quotes, POST /alias-suggestions. |
| Write | 60 per minute | Every other POST, PATCH and DELETE. |
| Purchase | 20 per minute | Calls that charge the card: POST /orders, POST /prewarmed-orders, POST /orders/:id/add-domains, POST /domain-purchases. |
Limits count per token, across all the workspaces it covers, in windows of one minute. Some calls have an extra limit of their own, e.g. domain checks (60 per minute per person); going over it also answers 429 rate_. Calls with a missing or wrong token are limited per address and answer 429 too_.
Headers
Every answer that passed the token check tells you where you stand in the bucket the call used:
Answer headers
RateLimit-Limit: 300 RateLimit-Remaining: 287 RateLimit-Reset: 60
| Header | Meaning |
|---|---|
RateLimit-Limit | Calls allowed in this window. |
RateLimit-Remaining | Calls left in this window. |
RateLimit-Reset | The window length in seconds (60). Wait at most this long. |
Retry-After | Only on 429: seconds to wait before you try again. |
Over the limit
429 Too Many Requests
{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Too many requests. This token may make 20 purchase requests per minute. Try again in a minute.",
"request_id": "8f2c1e9a-4b7d-4e2a-9c1d-2b5a7e9f0c3d",
"doc_url": "https://docs.scaledmail.com/v2/errors#rate_limited"
}
}- Wait at least
Retry-Afterseconds, then retry. Add a little random delay if several workers share a token. - A refused call did nothing, so retrying is safe.
- Poll gently, and use
limit=100when you read long lists.
