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

# Introduction to the MarIA API

> Overview of the MarIA API: supported channels, architecture, and starting point for integration

Welcome to the **MarIA API**. This portal documents everything you need to integrate Omniloy's voice agent into your hospital environment.

## What this API covers

* **Inbound calls (Voice)**: MarIA answers patient calls, manages appointments with the EHR, and responds to FAQs.
* **WhatsApp**: the patient messages the center and MarIA manages appointments and answers FAQs just like on a phone call. Also sends confirmations and reminders via template.
* **Centers and services**: endpoints to query and manage the centers, services, and coverage configured in MarIA.
* **FAQ knowledge base**: document management that feeds the agent with information about your centers and services.
* **Outbound calls and questionnaires**: outbound call scheduling and follow up questionnaires through MarIA Core.
* **EHR/HIS integration via webhooks**: MarIA ⇄ Hospital for benefits, slots, and appointments.
* **Webhook management**: registration and configuration of endpoints to receive MarIA events.

## Main flow: inbound call

```mermaid theme={null}
sequenceDiagram
  autonumber
  participant P as Patient
  participant M as MarIA (Voice)
  participant E as EHR/HIS

  P->>M: Calls the center's number
  M-->>P: Greets and identifies need
  alt Appointment management
    M->>E: appointment.getBenefits / getSlots
    E-->>M: Catalog and availability
    M-->>P: Proposes options
    P-->>M: Confirms date and time
    M->>E: appointment.create
    E-->>M: appointmentId confirmed
    M-->>P: Appointment confirmed
    M-->>P: Sends WhatsApp confirmation (optional)
  else FAQ
    M-->>P: Responds using the FAQ knowledge base
  end
```

## Environments

| Environment | URL                            |
| ----------- | ------------------------------ |
| Production  | `https://{your-prod-endpoint}` |
| Staging     | `https://{your-dev-endpoint}`  |

Contact [support@omniloy.com](mailto:support@omniloy.com) to get your API key credentials.

## Authentication

All API operations use `X-Api-Key`. Webhooks from MarIA to your system are signed with `HMAC-SHA256`. See the [Authentication](/maria/en/auth) guide for details.

## OpenAPI Specification

The full OpenAPI specification is available in the **API Reference** section of this documentation.
