Stages
See where a lead is in its workflow, and move it with the same rules the CRM applies.
GET Get the workflow
/v1/leads/{id}/stagesThe lead's workflow and every stage in it, in order, with the current one marked and
allowedFromCurrent saying where it can go next. Not cacheable; it depends on where the lead is
right now.
idstring · uuidRequiredThe lead's id.
curl https://api.evacrm.co.uk/v1/leads/1e4e3f90-4384-42ce-90c3-540db5343964/stages \
-H "Authorization: Bearer sk_..."{
"lead": { "id": "1e4e3f90-…", "code": "L013898" },
"workflow": { "id": "…", "name": "Leads" },
"current": { "id": "90ee4027-…", "name": "Unassigned & Unappointed" },
"data": [
{ "id": "90ee4027-…", "name": "Unassigned & Unappointed", "order": 1, "category": "Live", "current": true, "allowedFromCurrent": false },
{ "id": "24c32379-…", "name": "Appointed", "order": 2, "category": "Live", "current": false, "allowedFromCurrent": true, "action": "Book appointment" },
{ "id": "bd7c3675-…", "name": "Sold", "order": 3, "category": "Sold", "current": false, "allowedFromCurrent": true },
{ "id": "86b1e72e-…", "name": "Lost", "order": 4, "category": "Lost", "current": false, "allowedFromCurrent": true }
]
}allowedFromCurrentfollows the rule the CRM's own stage dropdown uses: the transitions your administrator configured from the current stage. A workflow with no transitions configured at all is free-form, and every other stage is allowed.actionnames what the CRM would prompt staff for on that move (an appointment, a note). The API moves the stage without it.categoryis the stage's kind. Moving into aSoldorLostcategory stage flips the lead'sstatus.descriptioncarries the administrator's note on the stage, when there is one.
PUT Move to a stage
/v1/leads/{id}/stageMoves the lead. The move runs through the CRM, so everything the CRM does on a stage change happens: the stage history (marked as moved via the API), automatic tasks and notes configured on the stage, and sold/lost flags.
idstring · uuidRequiredThe lead's id.
stagestring · id or nameRequiredA stage from the workflow. Names match case-insensitively within the lead's own workflow.
curl -X PUT https://api.evacrm.co.uk/v1/leads/1e4e3f90-4384-42ce-90c3-540db5343964/stage \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{ "stage": "Appointed" }'{
"changed": true,
"lead": { "id": "1e4e3f90-…", "code": "L013898" },
"from": { "id": "90ee4027-…", "name": "Unassigned & Unappointed" },
"to": { "id": "24c32379-…", "name": "Appointed" }
}GET List workflows
/v1/leads/workflowsEvery lead workflow in your organisation with its stages in order. This is where the names and
ids for the stage and workflow filters on list leads come from.
The same stage name often exists in more than one workflow; a filter by name covers all of them.
Cacheable for five minutes; it changes only when someone edits the workflow settings in the CRM.
curl https://api.evacrm.co.uk/v1/leads/workflows \
-H "Authorization: Bearer sk_..."{
"object": "list",
"data": [
{
"id": "3f0c1b2e-…",
"name": "T&K August 2023",
"active": true,
"default": true,
"subWorkflow": false,
"stages": [
{ "id": "90ee4027-…", "name": "Unassigned & Unappointed", "order": 1, "category": "Live", "description": null },
{ "id": "24c32379-…", "name": "Appointed", "order": 2, "category": "Live", "description": null },
{ "id": "bd7c3675-…", "name": "Sold", "order": 3, "category": "Sold", "description": null },
{ "id": "86b1e72e-…", "name": "Lost", "order": 4, "category": "Lost", "description": null }
]
},
{
"id": "a91d…",
"name": "T&K Lead Workflow",
"active": true,
"default": false,
"subWorkflow": false,
"stages": [
{ "id": "…", "name": "New", "order": 1, "category": "Live", "description": null },
{ "id": "…", "name": "Quote Sent", "order": 2, "category": "Live", "description": "Awaiting the customer" },
{ "id": "…", "name": "Sold", "order": 3, "category": "Sold", "description": null }
]
}
]
}default marks the workflow new leads start in. subWorkflow is a workflow a stage of another
one hands off to; leads can still sit in it, and its stages filter like any other.