Skip to content

Pipelines API

All pipeline endpoints are prefixed with /api/pipelines and require authentication.

GET /api/pipelines

Returns all pipelines in your workspace with their stages.

Terminal window
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 /api/pipelines/:id

Returns a single pipeline with its stages.


POST /api/pipelines

Creates a new pipeline with stages.

Terminal window
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:

FieldTypeRequiredDescription
namestringYesPipeline name
isDefaultbooleanNoWhether this is the default pipeline for new leads
stagesarrayYesArray of stage objects

Stage object:

FieldTypeRequiredDescription
namestringYesStage name
colorstringYesHex color code
ordernumberYesDisplay order (0-based)
isWinbooleanNoMarks this as the win stage
isLostbooleanNoMarks this as the lost stage

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

Terminal window
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 /api/pipelines/:id

Deletes a pipeline and its stages. The default pipeline cannot be deleted.

Terminal window
curl -X DELETE "https://leads.500rockets.io/api/pipelines/pipe_abc123" \
-H "X-API-Key: 5l_live_..."