Skip to main content
PATCH
New to condition branches? Start with List Condition Branches, which explains how a step branches and how a branch is addressed.
Send only the halves you want to change. A body that changes nothing is refused with SEQUENCE_BRANCH_NO_UPDATE.

Renaming

name is the branch’s display name. An empty string clears it, and lemlist goes back to labelling the branch by its rank (“Branch 1”, “Branch 2”, …). The Else branch cannot be renamed: SEQUENCE_BRANCH_IS_FALLBACK.

Changing what the branch tests

Send the same parameters POST /sequences/{sequenceId}/steps takes for a condition — customField, customOperator, customValue, scoreComparator, scoreThreshold, emailStatusFilter, callStatusFilter. conditionKey is refused: every branch of a step shares the step’s condition, and changing it is a change to the step, not to one branch. On a customLeadInfo step, changing customField changes it on every branch — a step tests one field, and each branch keeps its own operator and values.

The two halves are gated differently

Once leads have entered the campaign: The request is atomic, so a mixed body is refused whole. Send the rename on its own when that is all you need. One selector edit escapes the lock: on a lead-action condition (hasScore, aircallDone), a body carrying only delay changes how long the condition waits, not what it waits for, and is applied. Adding any other selector field to that body locks it again.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

sequenceId
string
required

The unique identifier of the sequence holding the condition step

stepId
string
required

The unique identifier of the condition step, from GET /campaigns/{campaignId}/sequences

branchSequenceId
string
required

The branch's own sub-sequence id, from GET /sequences/{sequenceId}/steps/{stepId}/branches. A branch is never addressed by its position.

Body

application/json
name
string

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.

delayType
enum<string>

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).

Available options:
within,
waitUntil
delay
integer

Length of that time window, in days.

scoreComparator
enum<string>

hasScore only - how the lead's score is compared to scoreThreshold.

Available options:
$gte,
$lt
scoreThreshold
integer

hasScore only - the score this branch tests against.

Required range: 0 <= x <= 100
emailStatusFilter
enum<string>[]

hasEmailAddress only - the email statuses this branch matches. Required to add a branch on that condition.

Minimum array length: 1
Available options:
deliverable,
risky,
undeliverable,
unverified
callStatusFilter
string[]

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.

Minimum array length: 1
customField
string

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. Every branch of a step tests the same field, so changing it here changes it on all of them.

customOperator
enum<string>

customLeadInfo only - how the field is compared. equal and contains need a customValue; empty and notEmpty refuse one.

Available options:
equal,
contains,
empty,
notEmpty
customValue
string

customLeadInfo only - the value the field is compared to. Required for equal and contains, and refused for empty and notEmpty.

Response

The branch as it now stands.

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.

sequenceId
string

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.

index
integer

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.

fallback
boolean

true on the Else branch - the one that catches every lead no other branch matched. Absent on the others.

key
string

The condition the step tests. Every branch of a step shares it: a branch never carries a condition of its own.

name
string

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.

delay
integer

Length of the time window the condition waits on the lead's action, in days. Only on the lead-action conditions that store one.

delayType
enum<string>

How the condition waits: within branches once the window is over, waitUntil parks the lead until the action happens, with no time bound.

Available options:
within,
waitUntil
scoreComparator
enum<string>

hasScore only - how the lead's score is compared to scoreThreshold.

Available options:
$gte,
$lt
scoreThreshold
integer

hasScore only - the score this branch tests against.

emailStatusFilter
enum<string>[]

hasEmailAddress only - the email statuses this branch matches.

Available options:
deliverable,
risky,
undeliverable,
unverified
callStatusFilter
string[]

aircallDone only - the call-status keys this branch matches.

customField
string

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.

customOperator
enum<string>

customLeadInfo only - how the field is compared to the tested values.

Available options:
equal,
contains,
empty,
notEmpty
customValues
string[]

customLeadInfo only - every value this branch tests; the branch matches when any of them does. Empty for the empty and notEmpty operators.

selector
string

The raw stored condition selector, as JSON. Returned only when none of the fields above could describe the branch.