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

# Errors

> One error shape, a fixed set of codes.

Every error has the same body, and every response carries an `X-Request-Id` header. Include the request id when you
contact us.

```json theme={null}
{
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "patient.id: Required",
    "request_id": "req_Q2w9Lx7Hc4Vb8Np1Zs3Kt6"
  }
}
```

Branch on `code`, not on `message` — messages may change.

| HTTP | Code | What to do |
| - | - | - |
| 400 | `VALIDATION_FAILED` | Fix the field named in `message`. |
| 400 | `IDEMPOTENCY_KEY_REQUIRED` | Add an `Idempotency-Key` header. |
| 401 | `AUTH_REQUIRED` | Send `Authorization: Bearer <key>`. |
| 401 | `KEY_INVALID`, `KEY_REVOKED`, `KEY_EXPIRED` | Use a current key. |
| 403 | `SCOPE_MISSING` | Create a key with the scope this endpoint needs. |
| 403 | `API_DISABLED` | The API is not enabled for this account yet. |
| 403 | `TEMPLATE_NOT_ALLOWED` | Choose a template from `GET /templates`. |
| 403 | `PERMISSION_DENIED` | The clinician's role in the organization does not allow it (for example creating patients); an org admin can change roles in RxNote. |
| 404 | `NOT_FOUND` | The patient or visit does not exist, or the key's clinician cannot see it. |
| 409 | `IDEMPOTENCY_CONFLICT` | Same `Idempotency-Key`, different body — use a new key for a new consultation. |
| 413 | `AUDIO_TOO_LARGE` | See [limits](/limits). |
| 422 | `AUDIO_MISSING`, `AUDIO_TYPE_UNSUPPORTED` | Upload the file with the declared type and size, then call process. |
| 422 | `CLINICIAN_NOT_FOUND` | Invite the clinician to the organization in RxNote. |
| 429 | `RATE_LIMITED`, `CONCURRENCY_LIMIT` | Wait `Retry-After` seconds. |
| 500 | `INTERNAL_ERROR` | Retry with the same `Idempotency-Key`. |


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