WACM.in Logo
Back to API Reference
REST API v1MCP Supported (10 Read Tools)

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 Ready

Feed WACM API specs directly to Cursor, Claude, ChatGPT, Antigravity, or custom AI agents.

Download .mdOpenAPI 3.1
Machine-Readable Feeds:/llms.txt /llms-full.txt

Pipelines & Stages

List workspace sales pipelines and their configured active stages, or initialize starter templates (simple, sales, appointments).

GET
/pipelines

List all active pipelines and their ordered stages. Paginated (default 25/page).

POST
/pipelines

Create a custom pipeline with a name or provision a starter template ('simple', 'sales', 'appointments'). Owner only.

List pipelines response
{
  "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.

GET
/leads

List or search enquiries. Filters: contact_id, pipeline_id, stage_id, owner_id, outcome, unassigned, needs_next_action, overdue_follow_up, search, page, per_page.

POST
/leads

Create a new enquiry. Requires contact_id, pipeline_id, title, and idempotent creation_key.

GET
/leads/{id}

Get complete enquiry details, contact, owner, current stage, next action, and pending task counts.

PATCH
/leads/{id}

Update enquiry fields. Requires version for optimistic concurrency control.

PUT
/leads/{id}/stage

Move enquiry to another stage. Requires stage_id, version, and lost_reason when outcome is lost.

GET
/leads/{id}/people

List assignable team members who can own this enquiry or receive follow-up tasks.

GET
/leads/{id}/activities

Paginated audit timeline of state transitions, stage movements, and notes for this enquiry.

Create enquiry request
{
  "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.

GET
/leads/{id}/notes

List internal notes for an enquiry, ordered from newest to oldest. Paginated (default 25/page).

POST
/leads/{id}/notes

Add 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.

GET
/tasks

List assigned follow-up tasks across enquiries. Filters: lead_id, status (pending/completed/cancelled), assignee_id, mine, reminded, overdue, due_from, due_to.

GET
/tasks/{id}

Get details of a specific follow-up task by its task ID.

GET
/leads/{id}/tasks

List all follow-up tasks linked to a specific enquiry.

POST
/leads/{id}/tasks

Schedule a follow-up task for an enquiry. Requires title, due_at (ISO 8601), optional assignee_id, and optional retry_key.

GET
/leads/{id}/tasks/{task_id}

Get details of a specific task within its enquiry context.

PATCH
/leads/{id}/tasks/{task_id}

Update task title, due_at, or assignee. Requires version for optimistic concurrency control.

PUT
/leads/{id}/tasks/{task_id}/complete

Mark a task completed. Requires outcome notes and version.

PUT
/leads/{id}/tasks/{task_id}/cancel

Mark a task cancelled. Requires cancellation reason and version.

Schedule follow-up task request
{
  "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.

GET
/reports

Read 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.

GET
/automation/preferences

Read the authenticated team member's notification preferences, verified work number, and active verification status.

PUT
/automation/preferences

Save 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 NameTarget EndpointDescription
list_crm_pipelines/crm/pipelinesList sales pipelines and their active stages.
list_crm_leads/crm/leadsList 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}/notesList internal notes linked to an enquiry.
list_crm_lead_activities/crm/leads/{lead_id}/activitiesList timeline activity history for an enquiry.
list_crm_lead_people/crm/leads/{lead_id}/peopleList assignable team members and active stakeholders for an enquiry.
list_crm_tasks/crm/tasksList 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/reportsRead conversion cohorts, intake trends, and stage stay durations.
get_crm_automation_preferences/crm/automation/preferencesRead the team member's notification preferences and verification status.