# Lakmus

Connect the clinic's Lakmus so the assistant finds free time and books patients to specialists

> Full REST + WebSocket API reference: https://api.happ.tools/reference

Lakmus is a medical information system for clinics. Once it is connected, the assistant finds the clinic's services and specialists, checks their free time, and books the patient into Lakmus right from the chat or call. It works with both cloud and self-hosted Lakmus.

## Before you start [#before-you-start]

* **Lakmus address** reachable from the internet over HTTPS, e.g. `https://clinic.lakmus.org`.
* **Lakmus API key** with access to the Booking API. Both are issued by Lakmus support or your Lakmus administrator.
* **HAPP workspace** with at least one assistant configured to talk to patients.

## Connect [#connect]

1. In HAPP open **Integrations** and find Lakmus under **Add a CRM**.
2. Click **Connect** and fill in the two fields.
3. Click **Connect** — HAPP checks the key with a live request to Lakmus before saving it.

| Field          | Value                                                                             |
| -------------- | --------------------------------------------------------------------------------- |
| Lakmus address | Your Lakmus address, e.g. `clinic.lakmus.org` — `https://` is added automatically |
| API key        | The key issued for the Booking API                                                |

The key is stored encrypted and is never shown again.

## Settings [#settings]

Open the gear icon on the assistant's Lakmus card.

* **Online booking** — the assistant searches services and specialists, checks free time (up to 14 days ahead), and books the patient with their name, phone, and complaints.
* **Branch** — free time is shown and bookings are made in this branch. If the clinic has several branches, pick one: without it the assistant cannot book.

The assistant books only a time it has just seen as free, and tells the patient they are booked only after Lakmus confirms the appointment.

## Troubleshooting [#troubleshooting]

| Problem                               | Cause                                                | Fix                                                                                        |
| ------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| "Lakmus rejected the API key"         | Wrong key, or the address is not a Lakmus API        | Check both with Lakmus support. Use the address without a path — HAPP adds `/api2` itself. |
| "Host must be a public https address" | `http://`, an IP of a local network, or `localhost`  | Lakmus must be reachable from the internet over HTTPS.                                     |
| "Choose the branch" when booking      | The clinic has several branches and none is selected | Open the assistant's Lakmus settings and pick the branch.                                  |
| The patient's phone is rejected       | Not a Ukrainian number                               | Bookings accept Ukrainian numbers (`050…`, `+380…`).                                       |

Still stuck? [Contact support](https://happ.tools/contacts) with the error text.

## Disconnect [#disconnect]

Open **Integrations** > **Lakmus** and click **Disconnect**. The assistant stops booking; appointments already in Lakmus stay untouched. The key is not revoked in Lakmus — revoke it there if needed.

## Next [#next]

* [CRM](/docs/integrations/crm) — all CRM integrations
* [Tools](/docs/agents/tools) — call the CRM during conversations
* [Integrations](/docs/integrations) — the full catalog
