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

# Brelio API

> Connect your AI assistant or your own software to Brelio, the practice-management software for healthcare clinics.

Brelio gives programs two doors to a clinic's data. Both are built from the same operation catalogue, so every operation has the same name, rules, permissions and errors in both.

| | REST API | MCP server |
| - | - | - |
| Address | `https://api.brelio.app/v1` | `https://api.brelio.app/mcp` |
| Who calls | Your code: scripts, integrations, partner software | An AI assistant: Claude, ChatGPT, Cursor, VS Code, Codex, Gemini |
| Credential | An API key or a partner app token | Your Brelio account, through OAuth; no key |
| Acts as | The clinic (organization key, partner app) or one person (personal key) | The person who connected it |
| Can do today | Read and write: book, reschedule and cancel appointments, manage patients and webhooks | Read only; writes go through REST. See [known limitations](https://docs.brelio.com/en/changelog.md#known-limitations) |

> [card] [Connect your AI assistant](https://docs.brelio.com/en/quickstart/mcp.md)
>
> Two minutes: add the MCP server to your assistant, sign in, and ask about your clinic.

> [card] [Make your first API call](https://docs.brelio.com/en/quickstart/api.md)
>
> Two minutes: create an API key and list your clinic's services with `curl`.

## What you can build

* **An assistant for the front desk.** Ask «¿Qué huecos tiene Laia el jueves por la mañana?» and get real free slots from the agenda.
* **Online booking.** Find free slots, book the patient, and reschedule or cancel when they ask.
* **Sync with your own systems.** Keep a CRM, a call centre tool or a data warehouse in step with the clinic's patients and appointments.
* **Automations.** Connect Brelio to n8n, Make or your own scripts, and receive signed webhooks instead of polling.

## What always holds

* **The same rules as the web app.** Same permissions, same center visibility, same validation and the same plan limits.
* **Patient data is closed by default.** The clinic decides which [data areas](https://docs.brelio.com/en/concepts/data-areas.md) integrations may use, and each credential needs its own acceptance before it touches patient data.
* **Changes never overwrite each other.** Every record carries a `version`; you send it back as `expectedVersion` ([concurrency](https://docs.brelio.com/en/concepts/concurrency.md)).
* **Retries are safe.** Every write takes an `Idempotency-Key` ([idempotency](https://docs.brelio.com/en/concepts/idempotency.md)).
* **Errors explain themselves.** One JSON shape with a stable `code` and, when there is one, a `hint` ([errors](https://docs.brelio.com/en/concepts/errors.md)).
* **Everything is recorded.** The clinic sees every connection and what it did, including refused attempts.

> [!NOTE]
>
> The API and MCP server are in early access. Calls from an organization without access answer `402 PLATFORM_PLAN_REQUIRED`. The API itself, its error texts and the OpenAPI document are in English; these docs are in Spanish and English.

## Machine-readable resources

| Resource | Address |
| - | - |
| OpenAPI 3.1 document | `https://api.brelio.app/v1/openapi.json` |
| MCP server | `https://api.brelio.app/mcp` |
| OAuth protected resource metadata | `https://api.brelio.app/.well-known/oauth-protected-resource/mcp` |
| These docs as plain text, for LLMs | `https://docs.brelio.com/llms.txt` |


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