Stages
List the stages of a pipeline
In funnel order: position 0 first, then 1, 2 and so on, the same order the stages have in the pipeline. Pages follow that order, so the first item of the first page is the first stage of the funnel.
Required scope: pipelines:read.
path Parameters
id^ppl_[0-9A-Za-z]{22}… · requiredThe id of the pipeline (ppl_…).
query Parameters
limitcursorThe nextCursor of the previous page, with the same filters.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
List the stages of a pipeline › Responses
Create a stage
Link the agent that works the stage with agentId. Cases enter the pipeline through its entry stage, so link the agent there.
Required scope: pipelines:write.
path Parameters
id^ppl_[0-9A-Za-z]{22}… · requiredThe id of the pipeline (ppl_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Create a stage › Request Body
nameclosestrue makes arriving at this stage end the conversation: the next message from the person starts a new case. A stage with statusType done ends it too.
closingOutcomeWhy the case closed, written in the case when it arrives here, up to 50 characters. It only counts in a stage that closes. null removes it.
statusTypeWhat the stage means in the pipeline: todo, in_progress or done. null leaves it without a type.
nextStageIdThe stage that follows when no transition holds. A stage of the same pipeline; null removes it.
Where a case goes from this stage, with their conditions. Replaces the whole list; an empty list removes them all.
Settings of the stage. Only the keys you send change, and null removes one.
positionWhere it goes among the stages, from 0. At the end when omitted.
entryMakes it the stage where new cases start. The first stage of a pipeline is the entry when none says so.
agentIdThe agent that works cases in this stage.
requiredFieldsKeys of fields a case needs before it can enter this stage.
Create a stage › Responses
objectidpipelineIdnamepositionentryagentIdrequiredFieldsclosesclosingOutcomestatusTypenextStageIdwhatsappPhoneNumberIdcreatedAtupdatedAtRetrieve a stage
Returns one stage of a pipeline by id. Use it to refresh a single record you already know; to find records, use the list route. Read only. 404 not_found when the id does not exist or belongs to another organization. You can repeat it safely: it has no side effects.
Required scope: pipelines:read.
path Parameters
id^ppl_[0-9A-Za-z]{22}… · requiredThe id of the pipeline (ppl_…).
stageId^stg_[0-9A-Za-z]{22}… · requiredThe id of the stage (stg_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Retrieve a stage › Responses
objectidpipelineIdnamepositionentryagentIdrequiredFieldsclosesclosingOutcomestatusTypenextStageIdwhatsappPhoneNumberIdcreatedAtupdatedAtDelete a stage
Answers 409 resource_in_use while cases are in it, and 409 conflict for the entry stage.
Required scope: pipelines:write.
path Parameters
id^ppl_[0-9A-Za-z]{22}… · requiredThe id of the pipeline (ppl_…).
stageId^stg_[0-9A-Za-z]{22}… · requiredThe id of the stage (stg_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Delete a stage › Responses
Update a stage
Link or unlink the agent, set the required fields, move it or make it the entry stage.
Required scope: pipelines:write.
path Parameters
id^ppl_[0-9A-Za-z]{22}… · requiredThe id of the pipeline (ppl_…).
stageId^stg_[0-9A-Za-z]{22}… · requiredThe id of the stage (stg_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Update a stage › Request Body optional
closestrue makes arriving at this stage end the conversation: the next message from the person starts a new case. A stage with statusType done ends it too.
closingOutcomeWhy the case closed, written in the case when it arrives here, up to 50 characters. It only counts in a stage that closes. null removes it.
statusTypeWhat the stage means in the pipeline: todo, in_progress or done. null leaves it without a type.
nextStageIdThe stage that follows when no transition holds. A stage of the same pipeline; null removes it.
Where a case goes from this stage, with their conditions. Replaces the whole list; an empty list removes them all.
Settings of the stage. Only the keys you send change, and null removes one.
namepositionentrytrue makes it the entry and unmarks the previous one. false is refused: make another stage the entry instead.
agentIdnull unlinks the agent.
requiredFieldsReplaces the list.
whatsappPhoneNumberIdA WhatsApp number of the organization. Messages that arrive at it start their cases in this stage. A number can feed one pipeline only. null releases it.
Update a stage › Responses
objectidpipelineIdnamepositionentryagentIdrequiredFieldsclosesclosingOutcomestatusTypenextStageIdwhatsappPhoneNumberIdcreatedAtupdatedAtMake a stage the entry stage
The stage becomes the only entry stage of its pipeline and the previous one stops being it. Safe to repeat. 404 not_found when the stage is not a stage of this pipeline.
Required scope: pipelines:write.
path Parameters
id^ppl_[0-9A-Za-z]{22}… · requiredThe id of the pipeline (ppl_…).
stageId^stg_[0-9A-Za-z]{22}… · requiredThe id of the stage (stg_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Make a stage the entry stage › Responses
objectidpipelineIdnamepositionentryagentIdrequiredFieldsclosesclosingOutcomestatusTypenextStageIdwhatsappPhoneNumberIdcreatedAtupdatedAt