> For the complete documentation index, see [llms.txt](https://mute-sh.gitbook.io/mute.sh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mute-sh.gitbook.io/mute.sh/api/getting-started/errors.md).

# Errors

All errors are JSON with a consistent envelope:

```json
{
  "statusCode": 401,
  "message": "The provided API key is invalid or revoked. Omit the key to use the free anonymous tier, or create one in the dashboard.",
  "path": "/v1/fills",
  "timestamp": "2026-07-03T12:26:41.878Z"
}
```

`message` is human-readable and specific — surface it in your logs. Validation errors (`400`) may return `message` as an array of per-field problems.

## Status codes

| Code  | Meaning                                                                                            | What to do                                                                          |
| ----- | -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `400` | Validation failed — bad coin format, unknown `market_class`, malformed address, out-of-range param | Fix the request; the message names the offending param                              |
| `401` | Missing/invalid/revoked API key on an endpoint that requires one                                   | Check the key; omit it entirely to fall back to the anonymous free tier             |
| `403` | Valid key, insufficient tier (e.g. `/v1/sports/*` or `/v1/l1-votes/*` without Enterprise)          | Upgrade, or use a non-gated endpoint                                                |
| `404` | Unknown resource / route                                                                           | Check the path — note casing like `/v1/settledOutcomes`                             |
| `429` | Rate limit or quota exceeded                                                                       | Honor `Retry-After`; see [Rate limits](/mute.sh/api/getting-started/rate-limits.md) |
| `500` | Unexpected server error                                                                            | Retry with backoff; if persistent, report it                                        |
| `503` | Upstream unavailable (ClickHouse / Hyperliquid)                                                    | Check `GET /health`, retry with backoff                                             |

## Empty results are not errors

Filters that match nothing return `200` with an empty `data` array, not a `404`:

```bash
curl -H "X-API-Key: $MUTE_KEY" \
  "https://api.mute.sh/v1/markets/overview?underlying=NOSUCHCOIN"
# → 200 {"data":[]}
```

Distinguish "the query is valid but matched nothing" (`200` + empty) from "the query is malformed" (`400`).

## SSE stream errors

Streams deliver errors in-band as an `event: error` frame (e.g. when you exceed the 3-concurrent-streams-per-principal cap), then close. Reconnect with backoff; the 30-minute per-connection cap also closes streams normally — treat reconnection as routine, not exceptional.

## Health check

`GET https://api.mute.sh/health` is public and unmetered — it reports service health and data-ingestion lag. Point your uptime checks there, and check it first when you see `503`s.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mute-sh.gitbook.io/mute.sh/api/getting-started/errors.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
