Limits
Request limit, headers and how to handle 429.
Request limit#
Each client may make 60 requests per minute per business. Several tokens of the same client for the same business share this quota; different businesses count separately.
On top of that, Kiosa guards against failed attempts: if an IP address sends more than 30 calls per minute with an invalid token, Kiosa answers those failed attempts with 429. Calls with a valid token are not affected.
Headers#
Every response contains the limit headers per the current IETF draft on RateLimit headers:
http
RateLimit-Policy: "default";q=60;w=60
RateLimit: "default";r=42;t=17| Part | Meaning |
|---|---|
q=60 | Quota: 60 requests |
w=60 | Window in seconds |
r | Requests remaining in the current window |
t | Seconds until the window resets |
Every response also carries X-Request-Id.
When you exceed it#
Kiosa answers 429 with the code rate_limited and the Retry-After header (seconds). Wait at least that long, then try again.
bash
curl -i https://api.kiosa.ai/v1/integrations \
-H "Authorization: Bearer $ACCESS_TOKEN"Recommendations#
- Read
RateLimitand slow down beforerreaches 0. - On
429, never retry immediately; wait forRetry-After. - Poll the status of an integration at intervals, not in a tight loop. After a
202with statustesting, every few seconds is enough.