Skip to main content

List pipelines and groups

GET /backend/pipelines
Returns the account’s groups and pipelines, ready to build the selector.

Response

groups
Group[]
Groups ordered by position
pipelines
Pipeline[]
Pipelines ordered by position, each with its group_id

Get a pipeline

GET /backend/pipelines/{id}
Returns the pipeline with its stages and loss reasons.
The default stage names (Entrada, Em andamento, Ganho, Perdido) and the default loss reasons are created by the API in Portuguese and returned verbatim. They are editable data — rename them with Configure a pipeline.
color uses the design system token format — an HSL triple without the hsl() wrapper, like "217 91% 60%".

Create a pipeline

POST /backend/pipelines
Requires the pipeline.manage permission. The created pipeline already comes with the four default stages and the default loss reasons.

Request Body

name
string
required
Pipeline name
description
string
Pipeline description
group_id
string
UUID of an existing group
new_group_name
string
Name of a group to create along with the pipeline
Provide group_id or new_group_name — a pipeline must belong to a group.
Returns 201 Created with the pipeline.

Configure a pipeline

PUT /backend/pipelines/{id}
Transactional save of the “Configure pipeline” screen: name, description, the complete and ordered list of stages, and the loss reasons.

Request Body

name
string
required
Pipeline name
description
string
Pipeline description
stages
ConfigStage[]
required
The complete and ordered list of stages. The position in the array defines the order on the board.
loss_reasons
string[]
The complete list of the pipeline’s loss reasons
reallocation_targets
object
Map { "removed_stage_id": "destination_stage_id" } for the stages that left the list
Stages omitted from the stages list are deleted. If a removed stage still has deals, you must provide its destination in reallocation_targets — otherwise the request returns 409. The destination must be a stage that stayed in the list.
In the example above, the Em andamento stage left the list and its deals were moved to Entrada. The Qualification stage was created (it has no id).

Reorder a pipeline

PUT /backend/pipelines/reorder
Moves a pipeline before another one and/or into another group.

Request Body

pipeline_id
string
required
UUID of the moved pipeline
group_id
string
required
UUID of the destination group
before_id
string
UUID of the pipeline that should end up after the moved one. Omit to place it at the end of the group.

Delete a pipeline

DELETE /backend/pipelines/{id}
Deletes the pipeline and all of its content: stages, loss reasons, deals, deal products, tags, activities, files and history. The operation is irreversible.

Groups

Groups organize pipelines in the selector (e.g. Marketing, Sales, CS).

List groups

GET /backend/pipeline/groups

Create a group

POST /backend/pipeline/groups
name
string
required
Group name
Returns 201 Created.

Rename a group

PUT /backend/pipeline/groups/{id}
name
string
required
New group name

Delete a group

DELETE /backend/pipeline/groups/{id}
A group that still contains pipelines cannot be deleted — the response is 409 with the count. Move the pipelines to another group first.
409 Conflict
Error message strings are returned by the API in Portuguese. Match on code (ERR_CONFLICT), never on the message text.