CRM & Sales Pipelines API
Manage sales pipelines, customer enquiries, follow-up tasks, internal notes, activity timelines, conversion reports, and team member notification preferences.
Authentication & Scope: All requests use Sanctum Bearer tokens and JSON payloads against https://app.wacm.in/api/v1/crm. All operations are tenant-scoped, role-checked, rate-limited to 60 requests/minute, and guarded by optimistic locking (version) to prevent lost updates.
CRM API reference for developers and AI assistants
LLM ReadyFeed WACM API specs directly to Cursor, Claude, ChatGPT, Antigravity, or custom AI agents.
Pipelines & Stages
List workspace sales pipelines and their configured active stages, or initialize starter templates (simple, sales, appointments).
/pipelinesList all active pipelines and their ordered stages. Paginated (default 25/page).
/pipelinesCreate a custom pipeline with a name or provision a starter template ('simple', 'sales', 'appointments'). Owner only.
{
"status": "success",
"data": [
{
"id": 1,
"name": "Default Sales",
"is_active": true,
"stages": [
{ "id": 1, "name": "New lead", "outcome": "open", "order": 1 },
{ "id": 2, "name": "Qualified", "outcome": "open", "order": 2 },
{ "id": 3, "name": "Proposal", "outcome": "open", "order": 3 },
{ "id": 4, "name": "Won", "outcome": "won", "order": 4 },
{ "id": 5, "name": "Lost", "outcome": "lost", "order": 5 }
]
}
]
}Leads & Enquiries
Enquiries represent commercial opportunities linked to contacts. Filter by pipeline, stage, owner, outcome, or overdue follow-up status.
/leadsList or search enquiries. Filters: contact_id, pipeline_id, stage_id, owner_id, outcome, unassigned, needs_next_action, overdue_follow_up, search, page, per_page.
/leadsCreate a new enquiry. Requires contact_id, pipeline_id, title, and idempotent creation_key.
/leads/{id}Get complete enquiry details, contact, owner, current stage, next action, and pending task counts.
/leads/{id}Update enquiry fields. Requires version for optimistic concurrency control.
/leads/{id}/stageMove enquiry to another stage. Requires stage_id, version, and lost_reason when outcome is lost.
/leads/{id}/peopleList assignable team members who can own this enquiry or receive follow-up tasks.
/leads/{id}/activitiesPaginated audit timeline of state transitions, stage movements, and notes for this enquiry.
{
"contact_id": 142,
"pipeline_id": 1,
"title": "Annual Enterprise Plan - Acme Corp",
"requirement": "Requires 10 agents, custom webhook sync, and SLA support",
"owner_id": 3,
"value": 120000,
"creation_key": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}Internal Notes
Private internal notes attached to an enquiry. Notes stay strictly internal and are never disclosed to customers or included in external notification templates.
/leads/{id}/notesList internal notes for an enquiry, ordered from newest to oldest. Paginated (default 25/page).
/leads/{id}/notesAdd an internal note. Requires body text, optional linked message_id, and optional retry_key.
Follow-up Tasks
Schedule and track team follow-ups. Every task requires an explicit due date, timezone, and assignee. Overdue tasks surface immediately on workspace dashboards.
/tasksList assigned follow-up tasks across enquiries. Filters: lead_id, status (pending/completed/cancelled), assignee_id, mine, reminded, overdue, due_from, due_to.
/tasks/{id}Get details of a specific follow-up task by its task ID.
/leads/{id}/tasksList all follow-up tasks linked to a specific enquiry.
/leads/{id}/tasksSchedule a follow-up task for an enquiry. Requires title, due_at (ISO 8601), optional assignee_id, and optional retry_key.
/leads/{id}/tasks/{task_id}Get details of a specific task within its enquiry context.
/leads/{id}/tasks/{task_id}Update task title, due_at, or assignee. Requires version for optimistic concurrency control.
/leads/{id}/tasks/{task_id}/completeMark a task completed. Requires outcome notes and version.
/leads/{id}/tasks/{task_id}/cancelMark a task cancelled. Requires cancellation reason and version.
{
"title": "Product Demo Call & Pricing Review",
"due_at": "2026-10-20T10:30:00+05:30",
"assignee_id": 3,
"retry_key": "c3a4f891-628d-4a11-8e7c-b3972a91219b"
}Reports & Funnel Analytics
Query conversion cohorts, intake growth, average stage stay duration, and win/loss performance over customizable date ranges and timezones.
/reportsRead CRM conversion cohorts, intake trends, and stage stay durations. Parameters: from, to, timezone, pipeline_id, owner_id, source, compare, page.
Automation & Notification Preferences
Configure staff WhatsApp notification preferences. Notifications are dispatched only to opted-in, verified work numbers to protect staff privacy and prevent unverified sends.
/automation/preferencesRead the authenticated team member's notification preferences, verified work number, and active verification status.
/automation/preferencesSave work WhatsApp number, opt-in status, and notify_tasks preference. Returns a 10-minute verification code when a new number is enrolled.
Model Context Protocol (MCP) Integration
The official @codingmantra/wacm-mcp package provides 10 dedicated CRM read tools for Claude Desktop, Cursor, and Antigravity:
| MCP Tool Name | Target Endpoint | Description |
|---|---|---|
| list_crm_pipelines | /crm/pipelines | List sales pipelines and their active stages. |
| list_crm_leads | /crm/leads | List or search enquiries with pipeline, stage, owner, and follow-up filters. |
| get_crm_lead | /crm/leads/{lead_id} | Read complete details of an enquiry by lead_id. |
| list_crm_lead_notes | /crm/leads/{lead_id}/notes | List internal notes linked to an enquiry. |
| list_crm_lead_activities | /crm/leads/{lead_id}/activities | List timeline activity history for an enquiry. |
| list_crm_lead_people | /crm/leads/{lead_id}/people | List assignable team members and active stakeholders for an enquiry. |
| list_crm_tasks | /crm/tasks | List assigned follow-up tasks and due reminders. |
| get_crm_task | /crm/tasks/{task_id} | Read details of a specific follow-up task. |
| get_crm_reports | /crm/reports | Read conversion cohorts, intake trends, and stage stay durations. |
| get_crm_automation_preferences | /crm/automation/preferences | Read the team member's notification preferences and verification status. |