Manage pipelines — the ordered stages through which deals progress.
See also: Deals & Pipelines concepts
| Method | Path | Description |
|---|---|---|
| POST | /pipelines | Create a pipeline |
| GET | /pipelines | List pipelines |
| GET | /pipelines/:id | Get a pipeline |
| PATCH | /pipelines/:id | Update a pipeline |
| DELETE | /pipelines/:id | Delete a pipeline |
| GET | /pipelines/:id/deals | List deals in a pipeline |
| POST | /pipelines/:id/stages | Add a stage |
| PUT | /pipelines/:id/stages | Reorder stages |
| DELETE | /pipelines/:id/stages/:stage_id | Remove a stage |
POST /pipelines
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Pipeline name |
is_default | boolean | no | Whether this is the default pipeline |
stages | array | no | Initial stages (see Add a stage for stage fields) |
metadata | object | no | Arbitrary key-value data |
curl -X POST "$REX_URL/pipelines" \
-H "X-Api-Key: $REX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Sales Pipeline",
"is_default": true,
"stages": [
{ "name": "Qualified", "type": "open", "color": "#3b82f6" },
{ "name": "Proposal Sent", "type": "open", "color": "#f59e0b" },
{ "name": "Closed Won", "type": "won", "color": "#10b981" },
{ "name": "Closed Lost", "type": "lost", "color": "#ef4444" }
]
}'
{
"data": {
"id": "pipe_01HQ...",
"name": "Sales Pipeline",
"is_default": true,
"stages": [
{
"id": "stg_01HQ...",
"name": "Qualified",
"position": 0,
"type": "open",
"color": "#3b82f6"
},
{
"id": "stg_02HQ...",
"name": "Proposal Sent",
"position": 1,
"type": "open",
"color": "#f59e0b"
},
{
"id": "stg_03HQ...",
"name": "Closed Won",
"position": 2,
"type": "won",
"color": "#10b981"
},
{
"id": "stg_04HQ...",
"name": "Closed Lost",
"position": 3,
"type": "lost",
"color": "#ef4444"
}
],
"created_at": "2026-03-16T12:00:00Z",
"updated_at": "2026-03-16T12:00:00Z"
}
}
GET /pipelines
| Parameter | Type | Description |
|---|---|---|
cursor | string | Pagination cursor |
limit | integer | Results per page (default 50, max 200) |
curl "$REX_URL/pipelines" \
-H "X-Api-Key: $REX_API_KEY"
{
"data": [
{
"id": "pipe_01HQ...",
"name": "Sales Pipeline",
"is_default": true,
"stages": [ ... ],
"created_at": "2026-03-16T12:00:00Z",
"updated_at": "2026-03-16T12:00:00Z"
}
],
"has_more": false
}
GET /pipelines/:id
curl "$REX_URL/pipelines/pipe_01HQ..." \
-H "X-Api-Key: $REX_API_KEY"
Returns the full pipeline object including all stages. See Create a pipeline for the response shape.
PATCH /pipelines/:id
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | Pipeline name |
is_default | boolean | no | Default pipeline flag |
metadata | object | no | Arbitrary key-value data |
Note: to modify stages, use the dedicated stage endpoints below.
curl -X PATCH "$REX_URL/pipelines/pipe_01HQ..." \
-H "X-Api-Key: $REX_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Enterprise Sales" }'
Returns the full updated pipeline.
DELETE /pipelines/:id
curl -X DELETE "$REX_URL/pipelines/pipe_01HQ..." \
-H "X-Api-Key: $REX_API_KEY"
204 No Content on success.
GET /pipelines/:id/deals
| Parameter | Type | Description |
|---|---|---|
cursor | string | Pagination cursor |
limit | integer | Results per page (default 50, max 200) |
status | string | Filter by deal status: open, won, lost, stalled |
stage_id | string | Filter by specific stage |
curl "$REX_URL/pipelines/pipe_01HQ.../deals?status=open" \
-H "X-Api-Key: $REX_API_KEY"
Standard deal list response. See Deals API.
POST /pipelines/:id/stages
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Stage name (e.g. "Qualified", "Proposal Sent") |
type | string | yes | Stage type: open, won, lost |
position | integer | no | Sort order (appended to end if omitted) |
color | string | no | Hex color for UI (e.g. #3b82f6) |
probability | number | no | Win probability 0.0-1.0 (inferred from position if omitted) |
curl -X POST "$REX_URL/pipelines/pipe_01HQ.../stages" \
-H "X-Api-Key: $REX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Negotiation",
"type": "open",
"color": "#8b5cf6",
"probability": 0.7
}'
Returns the full pipeline with the new stage included.
PUT /pipelines/:id/stages
Replaces the full stage ordering. All existing stage IDs must be included.
| Field | Type | Required | Description |
|---|---|---|---|
stage_ids | array of strings | yes | Stage IDs in desired order |
curl -X PUT "$REX_URL/pipelines/pipe_01HQ.../stages" \
-H "X-Api-Key: $REX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"stage_ids": ["stg_01HQ...", "stg_03HQ...", "stg_02HQ...", "stg_04HQ..."]
}'
Returns the full pipeline with stages in the new order.
DELETE /pipelines/:id/stages/:stage_id
curl -X DELETE "$REX_URL/pipelines/pipe_01HQ.../stages/stg_02HQ..." \
-H "X-Api-Key: $REX_API_KEY"
204 No Content on success.