CRM and agenda
CRM leads, deals, pipelines and activities; agenda event types, availability and bookings.
The CRM and the agenda are plan modules: if the organization does not have them, the API returns 403 module_not_available.
Scopes: crm:read / crm:write (/crm/ routes) and agenda:read / agenda:write (/agenda/ routes). To assign records to a team member (assigned_to), get user ids from GET /account/members/ (scope account:read, see Account and usage).
Leads
/api/v1/crm/leads/crm:write{
"name": "Lucía Ortega",
"email": "lucia@ortegaasesores.es",
"phone": "+34600111222",
"company_name": "Ortega Asesores",
"source": 3,
"estimated_value": "1800.00",
"assigned_to": 12,
"notes": "Requested a demo from the website"
}status: new, contacted, qualified, unqualified, converted, lost. Lead sources (source) live in /crm/sources/.
| Operation | Endpoint |
|---|---|
| Qualify | POST /crm/leads/{id}/qualify/ |
| Mark as lost | POST /crm/leads/{id}/lose/ with {"lost_reason": "…"} |
| Convert | POST /crm/leads/{id}/convert/ |
convert creates (or reuses) the customer and, unless you turn it off, a deal in the first stage of the default pipeline. It accepts create_customer and create_deal (booleans, default true), deal_title and deal_value, and returns lead, customer_id and deal_id.
Deals and pipelines
/api/v1/crm/deals/crm:write{
"title": "Billora rollout · Ortega Asesores",
"customer": 318,
"pipeline": 1,
"stage": 2,
"value": "1800.00",
"expected_close_date": "2026-12-15",
"probability": 60
}| Operation | Endpoint |
|---|---|
| Move to another stage | POST /crm/deals/{id}/move-stage/ with {"stage_id": 3} |
| Win / lose | POST /crm/deals/{id}/win/ · POST /crm/deals/{id}/lose/ with {"lost_reason": "…"} |
| Pipeline board | GET /crm/kanban/{pipeline_id}/ (stages with their open deals) |
| Pipelines and stages | /crm/pipelines/ · /crm/pipelines/{pipeline_id}/stages/ |
Activities and notes
Activities (/crm/activities/) are calls, meetings or tasks with subject, activity_type, scheduled_at and what they relate to (deal, lead or customer). Complete them with POST …/{id}/complete/ and reopen them with …/{id}/reopen/. Notes live in /crm/notes/ and activity types in /crm/activity-types/. The CRM summary is at GET /crm/dashboard/.
Agenda: event types and availability
| Resource | Route |
|---|---|
| Event types (duration, price, questions) | /agenda/event-types/ (+ POST …/{id}/toggle-active/) |
| Weekly availability rules | /agenda/availability-rules/ (POST …/bulk/ replaces them all) |
| Exceptions (holidays, single days) | /agenda/availability-overrides/ |
| Settings and public booking page | GET /agenda/settings/ · GET /agenda/check-slug/?slug= |
Bookings
/api/v1/agenda/bookings/agenda:write{
"event_type": 4,
"start_datetime": "2026-11-12T10:00:00+01:00",
"booker_name": "Lucía Ortega",
"booker_email": "lucia@ortegaasesores.es",
"customer": 318,
"notes": "First meeting"
}status: scheduled, confirmed, cancelled, completed, no_show. Filter the list with date_from, date_to, event_type, status, customer or patient.
| Operation | Endpoint |
|---|---|
| Confirm | POST /agenda/bookings/{id}/confirm/ |
| Complete / no-show | POST /agenda/bookings/{id}/complete/ · POST /agenda/bookings/{id}/no-show/ |
| Cancel (sends the cancellation notice) | POST /agenda/bookings/{id}/cancel/ |
| Calendar for a date range | GET /agenda/bookings-calendar/ |
If the booking is linked to a clinic patient, patient_name is only returned to keys with clinica:read; otherwise it is null.
Events
lead.created, .updated, .converted, .deleted; deal.created, .updated, .won, .lost, .deleted; booking.created, .updated, .cancelled, .deleted. See webhooks.
