---
title: Errors reference
description: Every stable error code across the API, by HTTP status.
order: 6
---

Every error response is `application/problem+json` ([RFC 7807](https://www.rfc-editor.org/rfc/rfc7807)):

```json
{
  "type": "https://dike.it.com/errors/not_found",
  "title": "Not Found",
  "status": 404,
  "detail": "No document with canonical_id 'eg-leg-9999-1'.",
  "code": "not_found"
}
```

Match on `code` — it's the only field guaranteed stable across releases. `title`/`detail` are human-readable and can be reworded without notice.

| Status | `code` | Where it shows up |
|---|---|---|
| 401 | `unauthorized` | Any `/v1/*` route, missing or invalid API key |
| 403 | `plan_required` | `/v1/reason` on a Free plan |
| 404 | `not_found` | `/v1/document/{canonical_id}`, unknown ID |
| 404 | `citation_not_found` | `/v1/cite`, citation parsed but no document matches |
| 422 | `citation_unparseable` | `/v1/cite`, citation string didn't match any known pattern |
| 422 | `validation_error` | Any endpoint, request body failed schema validation |
| 429 | `rate_limited` | Any endpoint, over the plan's per-minute limit |
| 503 | `upstream_unavailable` | Mongo, Qdrant, the embedding service, or the LLM is unreachable |

See [Rate limits & errors](/docs/getting-started/rate-limits-errors) for the per-plan limits behind `429`.
