Pipeline
The pipeline is the ordered list of stages your deals move through.
Permissions: contacts:read and contacts:write.
The stage object
json
{
"id": 1,
"name": "Proposal",
"position": 1,
"color": "#6366f1",
"is_won": false,
"is_lost": false,
"probability": 40,
"deals_count": 6,
"created_at": "...",
"updated_at": "..."
}Mark one stage as is_won (for example "Closed won") and another as is_lost (for example "Closed lost"). The won and lost actions on deals move deals to these stages.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /crm/pipeline | Every stage, sorted by position (not paginated) |
| POST | /crm/pipeline | Create a stage |
| POST | /crm/pipeline/reorder | Reorder the stages |
| PUT | /crm/pipeline/{id} | Update a stage (partial) |
| DELETE | /crm/pipeline/{id} | Delete a stage. Returns 204. |
Create a stage
| Field | Rules |
|---|---|
name | Required. Max 255 characters |
color | Hex color such as #22c55e. Default #6366f1 |
position | Integer ≥ 0. Defaults to after the last stage |
is_won / is_lost | boolean, default false |
probability | 0–100, default 0 |
201: { "data": DealStage }
Reorder
json
{ "stages": [4, 1, 2, 3] }Each stage's position in the array becomes its new position, starting at 0.
200: { "data": [DealStage], "message": "Pipeline reordered" }
Delete
You can't delete a stage that still has deals:
json
{ "error": "HttpError", "message": "Cannot delete a stage that has deals. Move or delete the deals first.", "code": 422 }