Rate limits
Limits apply per token (not per user, not per IP) — every integration gets its own independent quota.| Window | Limit |
|---|---|
| Per minute | 60 requests |
| Per hour | 1,000 requests |
How to handle 429 properly
Use exponential backoff with jitter. Pseudocode:Error format
Every error follows the standard NestJS shape:| Status | Category | When |
|---|---|---|
400 Bad Request | Bad Request | Invalid body, malformed query params, schema validation failed. |
401 Unauthorized | Unauthorized | Token invalid, missing, revoked, or expired. See Authentication. |
403 Forbidden | Forbidden | Token is valid but lacks the required scope. See Scopes. |
404 Not Found | Not Found | Resource or route doesn’t exist. |
429 Too Many Requests | Throttler | You hit the rate limit. |
500 Internal Server Error | Internal Server Error | Server-side bug. If it persists, report it. |
503 Service Unavailable | Service Unavailable | Maintenance or temporary degradation. Retry with backoff. |
Best practices
Idempotency
Design retries to be safe.
GET and DELETE are idempotent out of the box; for POST/PATCH, dedupe on your side with stable identifiers.Sensible timeouts
Set a client timeout between 10 and 30 seconds. Lower kills legitimate requests; higher locks your thread on transient slowness.
Log everything useful
Log status, request id (when the API returns one in headers), and duration. Future-you will thank you.
Circuit breaker
On repeated 5xx, pause requests for a few seconds. Your system stays up for everything else that doesn’t depend on Keebai.
In production
- Monitor latency, error rate, and status codes. An alert on error rate
>5%catches issues before users do. - Rotate tokens every 90 days, incident or not. Mint, deploy, validate, revoke the old.
- Audit Last used in the tokens table periodically. Tokens unused for months are revoke candidates.
- Suspect us? Email support@keebai.com.