{
"sequenceId": "seq_Nb4vKq7Xm2Rd9Tz1L",
"index": 2,
"key": "customLeadInfo",
"name": "Marketing",
"customField": "variables.jobTitle",
"customOperator": "contains",
"customValues": [
"CMO"
]
}{
"error": "emailStatusFilter is required to add a branch on condition \"hasEmailAddress\"",
"code": "SEQUENCE_BRANCH_VALUE_REQUIRED"
}The authentication you supplied is incorrectroute is available starting emailPro plan{
"error": "Condition branches are not enabled for this team",
"code": "SEQUENCE_BRANCH_BETA_REQUIRED"
}{
"error": "Step not found",
"code": "SEQUENCE_STEP_NOT_FOUND"
}{
"error": "You cannot add, remove or reorder branches once leads have entered the campaign",
"code": "SEQUENCE_BRANCH_CAMPAIGN_RUNNING"
}Add Condition Branch
Adds a branch to a condition step and returns it.
{
"sequenceId": "seq_Nb4vKq7Xm2Rd9Tz1L",
"index": 2,
"key": "customLeadInfo",
"name": "Marketing",
"customField": "variables.jobTitle",
"customOperator": "contains",
"customValues": [
"CMO"
]
}{
"error": "emailStatusFilter is required to add a branch on condition \"hasEmailAddress\"",
"code": "SEQUENCE_BRANCH_VALUE_REQUIRED"
}The authentication you supplied is incorrectroute is available starting emailPro plan{
"error": "Condition branches are not enabled for this team",
"code": "SEQUENCE_BRANCH_BETA_REQUIRED"
}{
"error": "Step not found",
"code": "SEQUENCE_STEP_NOT_FOUND"
}{
"error": "You cannot add, remove or reorder branches once leads have entered the campaign",
"code": "SEQUENCE_BRANCH_CAMPAIGN_RUNNING"
}PATCH …/branches if it should be
tested earlier.
lemlist mints the empty sub-sequence the branch routes to and returns its id as sequenceId. Pass
that id to POST /sequences/{sequenceId}/steps
to fill the branch with steps.
A branch carries the value it tests
There are no blank branches: the body must say what this one matches, and a step’s condition is never sent here.conditionKey in the body is refused with SEQUENCE_BRANCH_CONDITION_KEY_NOT_ALLOWED —
every branch of a step shares the step’s condition.
Only four conditions host more than one branch:
| Condition | Required in the body |
|---|---|
customLeadInfo | customValue — unless customOperator is empty or notEmpty, which refuse one. The tested field is inherited from the step, so customField is optional |
hasScore | nothing — the branch inherits a complete >= 80 band. Send scoreComparator and scoreThreshold to give it its own |
hasEmailAddress | emailStatusFilter |
aircallDone | callStatusFilter |
400: not-multi-capable when the condition supports a single branch
plus Else, SEQUENCE_BRANCH_CONDITION_NOT_CONFIGURABLE when it has no branch parameters on the API.
customLeadInfo step every branch tests the same field — only the operator and the value
differ. Sending a customField that differs from the step’s changes it on every branch at once.
A company field counts as the same in both of its forms: on a step that tests variables.companyName,
a branch sent as company.name keeps variables.companyName, like its siblings.When the campaign is running
Adding a branch changes the shape of the tree leads walk, so it is refused with409 once leads have
entered the campaign — see
Editing a running campaign.Authorizations
Path Parameters
Body
customLeadInfo only - the field to test. A bare name reads as a lead variable (jobTitle becomes variables.jobTitle); prefix with fields. to test a contact field. A company field is written company.<field> - company.name, or company.sector for a company custom field named Sector - and companyName or variables.companyName is stored as company.name. On a step that already tests variables.companyName, the new branch keeps that form. Every branch of a step tests the same field, so changing it here changes it on all of them.
Response
The branch was added.
One branch of a condition step. Addressed by sequenceId - the sub-sequence its leads walk - never by position. The fields describing what the branch tests depend on the step's condition; the ones that do not apply are absent.
customLeadInfo only - the tested field, normalized: a lead variable reads back as variables.<name>, a contact field as fields.<name>, a company field as company.<field> (e.g. company.name), or as variables.company<Field> (e.g. variables.companyName) on a step that already tested it that way, which tests the same value. Every branch of the step tests the same field.
Was this page helpful?