Add Condition Branch
Adds a branch to a condition step and returns it.
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:
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.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
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The unique identifier of the sequence holding the condition step
The unique identifier of the condition step, from GET /campaigns/{campaignId}/sequences
Body
The branch's display name. An empty string clears it, and lemlist falls back to labelling the branch "Branch 1", "Branch 2", … by rank. The Else branch cannot be named.
How a lead-action condition waits: within branches once the delay window is over, waitUntil parks the lead until the action happens, with no time bound. Ignored by the conditions that store no time window (customLeadInfo, hasEmailAddress).
within, waitUntil Length of that time window, in days.
hasScore only - how the lead's score is compared to scoreThreshold.
$gte, $lt hasScore only - the score this branch tests against.
0 <= x <= 100hasEmailAddress only - the email statuses this branch matches. Required to add a branch on that condition.
1deliverable, risky, undeliverable, unverified aircallDone only - the call-status keys this branch matches. The keys are the team's own (defaults plus custom dispositions), so any non-empty string is accepted. Required to add a branch on that condition.
1customLeadInfo 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. Every branch of a step tests the same field, so changing it here changes it on all of them.
customLeadInfo only - how the field is compared. equal and contains need a customValue; empty and notEmpty refuse one.
equal, contains, empty, notEmpty customLeadInfo only - the value the field is compared to. Required for equal and contains, and refused for empty and notEmpty.
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.
The branch's sub-sequence id, and its address on every branch endpoint. Pass it to POST /sequences/{sequenceId}/steps to add steps inside the branch.
Execution rank among the non-fallback branches, starting at 0. The first branch whose test matches takes the lead. Absent on the Else branch, which always runs last.
true on the Else branch - the one that catches every lead no other branch matched. Absent on the others.
The condition the step tests. Every branch of a step shares it: a branch never carries a condition of its own.
The branch's display name, present only when someone has set one. lemlist labels the unnamed ones "Branch 1", "Branch 2", … and "Else"; those defaults are not stored and are not returned here.
Length of the time window the condition waits on the lead's action, in days. Only on the lead-action conditions that store one.
How the condition waits: within branches once the window is over, waitUntil parks the lead until the action happens, with no time bound.
within, waitUntil hasScore only - how the lead's score is compared to scoreThreshold.
$gte, $lt hasScore only - the score this branch tests against.
hasEmailAddress only - the email statuses this branch matches.
deliverable, risky, undeliverable, unverified aircallDone only - the call-status keys this branch matches.
customLeadInfo only - the tested field, normalized: a lead variable reads back as variables.<name>, a contact field as fields.<name>. Every branch of the step tests the same field.
customLeadInfo only - how the field is compared to the tested values.
equal, contains, empty, notEmpty customLeadInfo only - every value this branch tests; the branch matches when any of them does. Empty for the empty and notEmpty operators.
The raw stored condition selector, as JSON. Returned only when none of the fields above could describe the branch.