Rate limits
To keep the API fast and fair for every clinic, requests are rate limited per API key. Well-behaved clients rarely hit the limit; when they do, the response tells them exactly how long to wait.
#How limits work
Limits are applied per key in fixed one-minute windows: 120 requests per minute for the API as a whole, and a separate 20 per minute for POST /v1/calls, since each of those rings a real phone. When you exceed the limit, the API responds with 429 Too Many Requests and a Retry-After header indicating how many seconds to wait before retrying.
Every response carries the current state of the window:
| Header | Description |
|---|---|
X-RateLimit-Limit | Requests allowed per window. |
X-RateLimit-Remaining | Requests left in the current window. |
X-RateLimit-Reset | Unix time at which the window resets. |
HTTP/1.1 429 Too Many Requests
Retry-After: 2
Content-Type: application/problem+json
{
"type": "https://docs.smile-app.co.il/api/errors/rate_limited",
"title": "rate_limited",
"status": 429,
"detail": "Rate limit exceeded. Retry later."
}
#Staying under the limit
Page wide, not deep
Use the maximum limit=100 on list endpoints and the concise response format to fetch more per request. Cache catalog data (branches, providers, types) - it changes rarely.
- Batch and cache. Catalog and reference data is stable; fetch it once and reuse it.
- Avoid tight polling. Prefer webhooks over polling for changes - you'll get events pushed to you instead of hammering the API.
- Spread bulk work. When backfilling, add a small delay between pages rather than firing requests in parallel bursts.
#Handling 429 responses
Respect Retry-After and use exponential backoff with jitter for repeated failures:
attempt=0
until resp=$(curl -fsS https://api.smile-app.co.il/v1/appointments \
-H "Authorization: Bearer sk_live_..."); do
attempt=$((attempt + 1))
[ "$attempt" -ge 5 ] && break
sleep $((2 ** attempt))
done
If you consistently need higher throughput for a legitimate integration, contact SmileCloud support. Limits can be raised for an individual API key; X-RateLimit-Limit always shows the limit that applies to the key you used.