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

POST/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"
}
JSON

status: new, contacted, qualified, unqualified, converted, lost. Lead sources (source) live in /crm/sources/.

OperationEndpoint
QualifyPOST /crm/leads/{id}/qualify/
Mark as lostPOST /crm/leads/{id}/lose/ with {"lost_reason": "…"}
ConvertPOST /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

POST/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
}
JSON
OperationEndpoint
Move to another stagePOST /crm/deals/{id}/move-stage/ with {"stage_id": 3}
Win / losePOST /crm/deals/{id}/win/ · POST /crm/deals/{id}/lose/ with {"lost_reason": "…"}
Pipeline boardGET /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

ResourceRoute
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 pageGET /agenda/settings/ · GET /agenda/check-slug/?slug=

Bookings

POST/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"
}
JSON

status: scheduled, confirmed, cancelled, completed, no_show. Filter the list with date_from, date_to, event_type, status, customer or patient.

OperationEndpoint
ConfirmPOST /agenda/bookings/{id}/confirm/
Complete / no-showPOST /agenda/bookings/{id}/complete/ · POST /agenda/bookings/{id}/no-show/
Cancel (sends the cancellation notice)POST /agenda/bookings/{id}/cancel/
Calendar for a date rangeGET /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.