Errors
The unified JSON error envelope and the stable error codes the API returns.
All errors use standard HTTP status codes with a JSON body containing a stable machine-readable
code and a human-readable message:
{
"error": {
"code": "not_found",
"message": "Document not found"
}
}Error codes
| HTTP | code | When |
|---|---|---|
| 400 | bad_request | Invalid or malformed request (including validation failures). |
| 401 | unauthorized | Missing, invalid, expired, or revoked API key. |
| 403 | forbidden | The key's owner lacks permission for the resource. |
| 404 | not_found | The resource does not exist or is not visible to the key. |
| 409 | conflict | The request conflicts with current state. |
| 429 | rate_limited | Per-key rate limit exceeded. |
| 500 | internal | Unexpected server error. |
The code values are stable and safe to branch on; message is for humans and may change.