Pipelines API
All pipeline endpoints are prefixed with /api/pipelines and require authentication.
List pipelines
Section titled “List pipelines”GET /api/pipelines
Returns all pipelines in your workspace with their stages.
curl "https://leads.500rockets.io/api/pipelines" \ -H "X-API-Key: 5l_live_..."Response:
[ { "id": "pipe_abc123", "name": "Default Pipeline", "isDefault": true, "createdAt": "2026-03-01T12:00:00.000Z", "stages": [ { "id": "stg_1", "name": "New", "color": "#3b82f6", "order": 0, "isWin": false, "isLost": false }, { "id": "stg_2", "name": "Contacted", "color": "#eab308", "order": 1, "isWin": false, "isLost": false }, { "id": "stg_3", "name": "Qualified", "color": "#8b5cf6", "order": 2, "isWin": false, "isLost": false }, { "id": "stg_4", "name": "Converted", "color": "#22c55e", "order": 3, "isWin": true, "isLost": false }, { "id": "stg_5", "name": "Closed", "color": "#6b7280", "order": 4, "isWin": false, "isLost": true } ] }]Get a pipeline
Section titled “Get a pipeline”GET /api/pipelines/:id
Returns a single pipeline with its stages.
Create a pipeline
Section titled “Create a pipeline”POST /api/pipelines
Creates a new pipeline with stages.
curl -X POST "https://leads.500rockets.io/api/pipelines" \ -H "X-API-Key: 5l_live_..." \ -H "Content-Type: application/json" \ -d '{ "name": "Enterprise Sales", "isDefault": false, "stages": [ { "name": "Inbound", "color": "#3b82f6", "order": 0 }, { "name": "Discovery", "color": "#8b5cf6", "order": 1 }, { "name": "Proposal", "color": "#f59e0b", "order": 2 }, { "name": "Won", "color": "#22c55e", "order": 3, "isWin": true }, { "name": "Lost", "color": "#ef4444", "order": 4, "isLost": true } ] }'Body:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Pipeline name |
isDefault | boolean | No | Whether this is the default pipeline for new leads |
stages | array | Yes | Array of stage objects |
Stage object:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Stage name |
color | string | Yes | Hex color code |
order | number | Yes | Display order (0-based) |
isWin | boolean | No | Marks this as the win stage |
isLost | boolean | No | Marks this as the lost stage |
Update a pipeline
Section titled “Update a pipeline”PUT /api/pipelines/:id
Updates a pipeline’s name, default status, or stages. When updating stages, send the full list of stages (existing stages with IDs, new stages without IDs).
curl -X PUT "https://leads.500rockets.io/api/pipelines/pipe_abc123" \ -H "X-API-Key: 5l_live_..." \ -H "Content-Type: application/json" \ -d '{ "name": "Updated Pipeline", "stages": [ { "id": "stg_1", "name": "New", "color": "#3b82f6", "order": 0 }, { "name": "Demo Scheduled", "color": "#f59e0b", "order": 1 }, { "id": "stg_4", "name": "Won", "color": "#22c55e", "order": 2, "isWin": true } ] }'Stages not included in the update will be removed.
Delete a pipeline
Section titled “Delete a pipeline”DELETE /api/pipelines/:id
Deletes a pipeline and its stages. The default pipeline cannot be deleted.
curl -X DELETE "https://leads.500rockets.io/api/pipelines/pipe_abc123" \ -H "X-API-Key: 5l_live_..."