Pipelines & Stages API
Pipelines define the funnel stages your leads move through. Each tenant gets one default pipeline; create more for parallel sales motions.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | `/api/v1/pipelines` | List |
| POST | `/api/v1/pipelines` | Create |
| GET | `/api/v1/pipelines/:id` | Get |
| PATCH | `/api/v1/pipelines/:id` | Update |
| GET | `/api/v1/pipelines/:id/stages` | List stages with lead counts (Kanban view) |
| POST | `/api/v1/pipelines/:id/stages` | Add a stage |
| PATCH | `/api/v1/pipelines/:id/stages/:stageId` | Update stage |
| DELETE | `/api/v1/pipelines/:id/stages/:stageId` | Delete stage |
| GET | `/api/v1/pipelines/:id/stats` | Funnel metrics (win rate, cycle days, etc.) |
| GET | `/api/v1/stage-triggers` | List stage-based automation triggers |
| POST | `/api/v1/stage-triggers` | Create trigger |
Schema
{
"id": "pip_01H...",
"tenantId": "tnt_01H...",
"name": "Default Sales",
"isDefault": true,
"stages": [
{ "id": "stg_new", "pipelineId": "pip_01H...", "name": "New", "order": 0, "probability": 10, "color": "#6366F1" },
{ "id": "stg_qual", "pipelineId": "pip_01H...", "name": "Qualified", "order": 1, "probability": 40, "color": "#06B6D4" }
],
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-04-15T08:00:00Z"
}Every response uses the standard envelope:
{
"success": true,
"data": { /* resource or array */ },
"meta": { "total": 100, "cursor": "...", "hasMore": true },
"error": { "code": "ERROR_CODE", "message": "Human readable" }
}error is omitted on success; meta is omitted when not paginating.
Rate Limits
Subject to the standard 200 req/min/tenant authenticated limit. See [Rate Limits](/docs/api-reference/rate-limits) for full details and the per-endpoint overrides.