Pipelines & stages
Discover the pipeline and stage IDs used when creating and moving leads (plus the lost reasons) and create, update, delete or install ready-made pipelines. Read = `pipelines:read` · write = `pipelines:write`.
https://app.syncro.chat/api/v1AuthX-API-Key: crm_SUA_CHAVE_AQUIList pipelines and stages
/pipelinespipelines:readReturns all account pipelines with their stages (in order) and the list of lost reasons.
curl "https://app.syncro.chat/api/v1/pipelines" \ -H "X-API-Key: crm_SUA_CHAVE_AQUI"
{
"success": true,
"pipelines": [
{
"id": 1,
"name": "Vendas",
"stages": [
{
"id": 5,
"name": "Prospecção",
"color": "#FF6B6B",
"is_won": false,
"is_lost": false
},
{
"id": 6,
"name": "Proposta",
"color": "#4ECDC4",
"is_won": false,
"is_lost": false
},
{
"id": 10,
"name": "Ganho",
"color": "#95E1D3",
"is_won": true,
"is_lost": false
},
{
"id": 11,
"name": "Perdido",
"color": "#9CA3AF",
"is_won": false,
"is_lost": true
}
]
}
],
"lost_reasons": [
{
"id": 1,
"name": "Preço alto"
},
{
"id": 3,
"name": "Escolheu concorrente"
}
]
}Stage fields
| Field | Description |
|---|---|
is_won |
true on won stages (used in PUT /leads/{id}/won) |
is_lost |
true on lost stages (used in PUT /leads/{id}/lost) |
The lost_reasons feed the reason_id parameter of PUT /leads/{id}/lost.
Create and update pipelines
Beyond listing, you can create, update, delete and install ready-made pipelines.
- Re-importable spec.
GET /pipelines/{id}returns{name, color, auto_create_*, stages:[{name, is_won, is_lost, required_tasks:[...]}]}— the same object POST/PUT accept back. - Auto-capture starts OFF via API (
auto_create_from_whatsapp/auto_create_from_instagram). Turn it on explicitly for the pipeline to capture WhatsApp/Instagram leads. validate_only: true= dry-run (responds200witherrors/warnings, writing nothing).- PUT replaces everything. Stages are matched by name, tasks by subject — the ones that remain keep their lead links; removing a stage that still has leads is rejected (
stage_has_leads), so move the leads first. - A duplicate name on POST returns 422
name_conflict— POST never overwrites; usePUTto update. - Including one
is_wonand oneis_loststage is recommended: without them leads cannot be marked as won or lost (this is a warning, not an error).
Fetch a pipeline
/pipelines/1pipelines:readReturns the pipeline status plus the re-importable spec (the same object accepted in POST/PUT).
curl "https://app.syncro.chat/api/v1/pipelines/1" \ -H "X-API-Key: crm_SUA_CHAVE_AQUI"
{
"success": true,
"data": {
"id": 1,
"is_default": true,
"stage_count": 3,
"lead_count": 128,
"spec": {
"name": "Funil de Vendas",
"color": "#007DFF",
"auto_create_from_whatsapp": false,
"auto_create_from_instagram": false,
"stages": [
{
"name": "Novo",
"is_won": false,
"is_lost": false,
"required_tasks": [
{
"subject": "Ligar",
"task_type": "call",
"priority": "high"
}
]
},
{
"name": "Ganho",
"is_won": true,
"is_lost": false,
"required_tasks": []
},
{
"name": "Perdido",
"is_won": false,
"is_lost": true,
"required_tasks": []
}
]
}
}
}Create pipeline
/pipelinespipelines:writeBody parameters
namestringrequired422 name_conflictstagesarrayrequiredstages[].namestringrequiredPUT uses to match stages)stages[].is_wonbooleanoptionalstages[].is_lostbooleanoptionalstages[].required_tasksarrayoptional{ subject, task_type, priority } (matched by subject on PUT)colorstringoptionalauto_create_from_whatsappbooleanoptionalfalse via APIauto_create_from_instagrambooleanoptionalfalse via APIvalidate_onlybooleanoptionalerrors/warnings without writing anythingcurl -X POST "https://app.syncro.chat/api/v1/pipelines" \
-H "X-API-Key: crm_SUA_CHAVE_AQUI" \
-H "Content-Type: application/json" \
-d '{
"name": "Funil de Vendas",
"stages": [
{
"name": "Novo",
"required_tasks": [
{
"subject": "Ligar",
"task_type": "call",
"priority": "high"
}
]
},
{
"name": "Ganho",
"is_won": true
},
{
"name": "Perdido",
"is_lost": true
}
]
}'{
"success": true,
"warnings": [],
"data": {
"id": 7,
"is_default": false,
"stage_count": 3,
"lead_count": 0,
"spec": {
"name": "Funil de Vendas",
"color": "#007DFF",
"auto_create_from_whatsapp": false,
"auto_create_from_instagram": false,
"stages": [
{
"name": "Novo",
"is_won": false,
"is_lost": false,
"required_tasks": [
{
"subject": "Ligar",
"task_type": "call",
"priority": "high"
}
]
},
{
"name": "Ganho",
"is_won": true,
"is_lost": false,
"required_tasks": []
},
{
"name": "Perdido",
"is_won": false,
"is_lost": true,
"required_tasks": []
}
]
}
}
}Update pipeline
/pipelines/7pipelines:writeReplaces the whole spec — send the complete object (do a GET first).
Stages are matched by name and tasks by subject: the ones that remain keep their lead links.
Removing a stage that still has leads is rejected with stage_has_leads — move the leads first.
curl -X PUT "https://app.syncro.chat/api/v1/pipelines/7" \
-H "X-API-Key: crm_SUA_CHAVE_AQUI" \
-H "Content-Type: application/json" \
-d '{
"name": "Funil de Vendas",
"stages": [
{
"name": "Novo",
"required_tasks": [
{
"subject": "Ligar",
"task_type": "call",
"priority": "high"
}
]
},
{
"name": "Proposta"
},
{
"name": "Ganho",
"is_won": true
},
{
"name": "Perdido",
"is_lost": true
}
]
}'Delete pipeline
/pipelines/7pipelines:writecurl -X DELETE "https://app.syncro.chat/api/v1/pipelines/7" \ -H "X-API-Key: crm_SUA_CHAVE_AQUI"
{
"success": true
}Discover what is valid
/pipelines/capabilitiespipelines:readReturns the accepted fields, the enums (task_type, priority), the limits and the update rules — always in sync with the server. Check it before assembling a pipeline.
curl "https://app.syncro.chat/api/v1/pipelines/capabilities" \ -H "X-API-Key: crm_SUA_CHAVE_AQUI"
List ready-made templates
/pipelines/templatespipelines:readLists the official pipeline templates, organized by niche.
curl "https://app.syncro.chat/api/v1/pipelines/templates" \ -H "X-API-Key: crm_SUA_CHAVE_AQUI"
Install a template
/pipelines/templates/funil-de-vendas/installpipelines:writeInstalls a template into the account. Idempotent by name — installing twice does not duplicate the pipeline.
curl -X POST "https://app.syncro.chat/api/v1/pipelines/templates/funil-de-vendas/install" \ -H "X-API-Key: crm_SUA_CHAVE_AQUI"