> ## Documentation Index
> Fetch the complete documentation index at: https://docs.otbstudio.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> Error codes and HTTP statuses of the OTB Studio REST API, what each means and what to do, and how the MCP server reports failures.

Over REST, every error is `{"code":"…"}` and nothing else: a stable code, never a sentence, so you can translate it for your own users. The [MCP server](/mcp.md#errors-and-limits) reports a miss as a normal result instead; only `401` and `429` reach an MCP client as statuses.

| Code | Status | Means | What to do |
| - | - | - | - |
| `missing_token` | 401 | No `Authorization: Bearer` header | Send your API key |
| `invalid_token` | 401 | Unknown, malformed or revoked key | Check the key, or create a new one |
| `query_required` | 400 | `GET /v1/companies` with no `q` | Add a search term |
| `insufficient_credits` | 402 | No plan, or the balance does not cover this reply | Choose a plan or add credits at [app.otbstudio.ai](https://app.otbstudio.ai) |
| `not_found` | 404 | No company has this enterprise number, or no route has this path | Check the number or the path |
| `method_not_allowed` | 405 | The path exists, the method does not | Every data route is a `GET` |
| `rate_limited` | 429 | Over the organisation's rate, or too many calls at once | Retry after `Retry-After` seconds |
| `internal` | 500 | An error on our side | Retry; every data route is a safe, idempotent read |
| `busy` | 503 | The data could not be read within 15 seconds | Retry after `Retry-After` seconds |

On a `402`, `X-Credits-Cost` and `X-Credits-Remaining` say how far short the balance was. When the call was refused before it ran (no plan, or a zero balance), `X-Credits-Cost` is `0`, because the price is not known yet.

The account routes the dashboard uses have more codes. They are not part of a data integration.

Stuck? Email [engineering@otbstudio.ai](mailto:engineering@otbstudio.ai).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.