# Errors

A request that fails gets an HTTP status and a JSON body with an `error` object.

```json
{
  "error": {
    "code": "invalid_api_key",
    "message": "This API key doesn't exist or has been revoked."
  }
}
```

* `code` is stable, so programs and agents can branch on it.
* `message` explains the problem to a person. Its wording can change.
* `param`, when present, names the request field at fault, so a program can fix the request and try again.

## Codes

| Status | Code | Meaning |
| --- | --- | --- |
| 400 | `invalid_request` | The request is malformed, or a parameter is missing, malformed, or not one the endpoint takes |
| 401 | `invalid_api_key` | The API key is missing, malformed, unknown, or revoked. See [Authentication](/authentication) |
| 403 | `app_paused` | The API key's app is paused |
| 429 | `rate_limited` | The API key made too many requests. See [Rate limits](/rate-limits) |
| 500 | `internal_error` | Something went wrong on Circuitry's side. Retry after a short wait |

Each endpoint's reference page lists the other codes it can return.
