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

# Errors

> Every error the API returns, and what to do about it.

Errors use normal HTTP status codes and a stable `code` you can switch on:

```json theme={null}
{
  "error": {
    "code": "server_offline",
    "message": "The server is offline. Live data and commands work while it's running."
  }
}
```

| Status | Code | Meaning |
| - | - | - |
| 400 | `invalid_body` | The body isn't the JSON this endpoint expects. |
| 400 | `invalid_command` | The command is allowed, but its arguments aren't. The message shows the usage. |
| 401 | `missing_key` | No key was sent. |
| 401 | `malformed_key` | What was sent isn't shaped like an ERA key. |
| 403 | `invalid_key` | The key doesn't exist or was revoked. |
| 403 | `missing_scope` | The key can't do this, usually a read-only key trying to run a command. |
| 403 | `api_disabled` | The server doesn't have the API Pack. |
| 403 | `restricted_command` | That command can't be run through the API. |
| 404 | `not_found` | Unknown path, or the command id doesn't exist. |
| 405 | `method_not_allowed` | Wrong HTTP method for this path. |
| 413 | `payload_too_large` | The body is too big. |
| 429 | `rate_limited` | Slow down. See [rate limits](https://apidocs.eraus.gg/rate-limits.md). |
| 500 | `internal` | Something broke on our side. Send us the `X-Request-Id` header. |
| 503 | `server_offline` | Nobody's in the server right now. Logs and bans still work. |
| 503 | `maintenance` | The API is briefly down for maintenance. |

Every response has an `X-Request-Id` header. Include it when you report a problem.

> [!NOTE]
>
> The [ER:LC-compatible layer](https://apidocs.eraus.gg/erlc-compatibility.md) returns ER:LC's error shape (`{ "code": 2002, "message": "..." }`) and its numeric codes instead. There, an offline server answers HTTP `422`, like ER:LC.


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