Errors
Last updated:
The Data API error format, what each HTTP status means, and which errors to retry.
What does an error look like?
Every error answers with an HTTP status and a JSON body in the same shape:
{
"code": "BAD_REQUEST",
"message": "Input validation failed",
"issues": [
{ "path": ["take"], "message": "Too big: expected number to be <=200" }
]
}code: stable and safe to branch on.message: for people; its wording may change.issues: on a400, which parameters were wrong.
What does each status code mean?
| Status | code | Meaning | Retry? |
|---|---|---|---|
| 400 | BAD_REQUEST | A parameter is missing, the wrong type or out of range. See issues. | No: fix the request. |
| 401 | UNAUTHORIZED | No key, or the key does not exist or was revoked. | No: check the key. |
| 403 | FORBIDDEN | The key lacks the scope, is called from an address or origin it does not allow, or the brokerage's Data API plan has ended. | No. |
| 404 | NOT_FOUND | No such endpoint, or no such row in your brokerage. | No. |
| 409 | CONFLICT | A write cannot go ahead as sent: an earlier request with the same externalCallId is still running or held for review. | Only when the message says to retry. |
| 413 | PAYLOAD_TOO_LARGE | A POST /v1/calls transcript is longer than 500,000 characters. It is refused whole, never cut short. | No: send a shorter transcript. |
| 429 | TOO_MANY_REQUESTS | The monthly quota or the per-minute rate limit is used up. | Yes, after Retry-After seconds. |
| 500 | INTERNAL_SERVER_ERROR | Something failed on our side. | Yes, with backoff. |
For a 500, retry with exponential backoff (for example 1, 2, 4 and 8 seconds). A read is always safe to retry. POST /v1/calls is safe to retry with the same externalCallId, which returns the first reply rather than recording the call twice; POST /v1/people/{id}/deletion-requests returns the request already open rather than filing a second one.
