API reference
Errors and rate limits
Every status code the API answers with, the exact error bodies, and the limits.
Errors are JSON with a single error string. Successful responses are 200.
An error body
{ "error": "key revoked"}Status codes
| Status | error | What to do |
|---|---|---|
| 401 | missing bearer token | Send Authorization: Bearer pk_live_…. |
| 401 | unknown key | The key does not exist. Check you copied all of it. |
| 401 | invalid key | The key is malformed or does not match. |
| 401 | key revoked | Create a new key. |
| 404 | A sentence naming the id | Only from Retrieve a call: no such call in this workspace. |
| 429 | rate limit exceeded for this API key | Wait for Retry-After seconds. |
| 429 | too many failed authentication attempts | Stop retrying with a bad key; wait for Retry-After. |
| 503 | unavailable | Briefly unable to reach the database. Retry with backoff. |
Rate limits
| Limit | Counted per | Window |
|---|---|---|
| 600 requests | API key | Rolling hour |
| 30 failed authentications | Source IP address | Rolling hour |
Every 429 carries a Retry-After header in seconds. Each key has its own budget, so one busy integration cannot use up another’s.
Conventions
- Money is integer credit-hundredths:
100= $1.00. Never a float. - Timestamps are ISO 8601 strings in UTC.
- Phone numbers are E.164, without formatting.
- A value we do not have is
null: never an empty string, never a guess. - Query parameters that do not parse fall back to their default rather than erroring.