Skip to main content

Pipeline stages

The configurable stages a lead moves through.

5 endpoints. Every request needs an Authorization: Bearer mtro_... header, and responses follow the envelope described in Errors and conventions.

POST /pipeline-stages/create​

Create a new pipeline stage for the CRM.

Required scope: leads.write
MCP tool: pipeline_stages_create

Request body

FieldTypeRequiredDescription
namestringyesStage name (e.g. New, Contacted, Qualified, Won, Lost)
colorstringnoHex color code for the stage (e.g. #3B82F6)
isDefaultbooleannoWhether this is the default stage for new leads
isTerminalbooleannoWhether this is a terminal/final stage

Example

curl -X POST 'https://core.mtro.app/pipeline-stages/create' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{"name":"<name>"}'

POST /pipeline-stages/delete​

Delete a pipeline stage. This action cannot be undone.

Required scope: leads.write
MCP tool: pipeline_stages_delete

Request body

FieldTypeRequiredDescription
stageIdstringyesThe stage ID to delete

Example

curl -X POST 'https://core.mtro.app/pipeline-stages/delete' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{"stageId":"<stageId>"}'

GET /pipeline-stages/get/entity/{entityId}​

List all pipeline stages for a given entity. Pipeline stages define the CRM workflow for leads.

Required scope: leads.read
MCP tool: pipeline_stages_list

Path parameters

NameTypeRequiredDescription
entityIdstringyesThe entity ID to get stages for

Example

curl -X GET 'https://core.mtro.app/pipeline-stages/get/entity/<entityId>' \
-H 'Authorization: Bearer mtro_your_api_key'

Response

FieldType
stagesobject[]
errorboolean
Fields of stages[]
FieldType
idstring
entityIdstring
namestring
colorstring
orderinteger
isDefaultboolean
isTerminalboolean
lastUpdatedinteger

POST /pipeline-stages/reorder​

Reorder CRM pipeline stages. This writes workflow configuration and should require owner confirmation when used by an agent.

Required scope: leads.write
MCP tool: pipeline_stages_reorder

Request body

note

Field names are taken from the Core handler, which reads exactly these. Types and which of them are required are not yet documented.

FieldTypeRequiredDescription
stageIdsanyno

Example

curl -X POST 'https://core.mtro.app/pipeline-stages/reorder' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{}'

POST /pipeline-stages/update​

Update a pipeline stage.

Required scope: leads.write
MCP tool: pipeline_stages_update

Request body

FieldTypeRequiredDescription
stageIdstringyesThe stage ID to update
namestringnoUpdated stage name
colorstringnoUpdated hex color code
isDefaultbooleannoWhether this is the default stage
isTerminalbooleannoWhether this is a terminal stage

Example

curl -X POST 'https://core.mtro.app/pipeline-stages/update' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{"stageId":"<stageId>"}'