Reorder Condition Branches
Rewrites the execution priority of a condition step’s branches.
order must list every non-fallback branch of the step exactly once, by sequenceId. Leave the
Else branch out: it is not orderable and always stays last. A list that repeats a branch, omits one,
or names an id that is not a branch of this step is refused with SEQUENCE_BRANCH_ORDER_INVALID.
Sending the order the step already has changes nothing and still returns the branches.
Why PATCH on the collection
The reorder is aPATCH on …/branches rather than on a …/branches/order sub-path, which would
collide with the {branchSequenceId} segment. PATCH …/branches reorders; PATCH …/branches/{id}
edits one branch.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
Every branch of the step by sequenceId, in the new execution order, excluding the Else branch.
Response
The branches, in their new order.
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.