Skip to main content
PATCH
Use this endpoint to:
  • Edit the message content or subject of the step
  • Change the delay before this step executes
  • Update the title (for manual steps)
  • Change method/URL (for API steps)
  • Adjust delay logic for conditional steps
You cannot change the type of a step (e.g., from email to linkedinInvite). To do so, delete the step and create a new one. However, you need to add the type field in the request body even if you can’t modify it…
This endpoint refuses any condition step that has more than one branch besides Else, with 400 Multi-branch conditions cannot be edited via the API yet. — its rebuild would collapse the step back to a single branch plus Else and silently drop the others.To change the condition key of such a step, remove branches with DELETE …/branches/{branchSequenceId} until one is left, then patch it here. To change what one branch tests without touching the others, use PATCH …/branches/{branchSequenceId} instead.

Running campaigns

Editing a step does not require pausing the campaign. The new content applies to the sends that follow: a lead who already received that step keeps the version that was sent to them, and a lead who has not reached it yet gets the edited one. A refusal carries a code in the body next to the message, so a rejected edit can be told apart from a transport failure.

Supported Step Types

Request Body

Only include the fields you want to update. Required fields are not enforced here.
To remove the subject of an email step, send "subject": "". The email then replies in the thread of the previous email sent to the lead in this campaign instead of starting a new one.

Supported Condition Keys

For conditional steps:
  • hasEmailAddress
  • hasLinkedinUrl
  • hasPhoneNumber
  • customLeadInfo
  • hasScore
  • emailsOpened
  • emailsClicked
  • emailsUnsubscribed
  • meetingBooked
  • linkedinInviteAccepted
  • linkedinOpened
  • aircallDone
  • linkedinNetworkCheck
  • hasWhatsappAccount
A customLeadInfo step is patched with customField / customOperator / customValue; omitted fields keep their stored value, so { "type": "conditional", "customValue": "CTO" } changes the tested value alone.

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

stepId
string
required

The unique identifier of the step

Body

application/json
type
enum<string>
required

The type of step (required but cannot be changed - must match the existing step type)

Available options:
email,
manual,
phone,
api,
linkedinVisit,
linkedinInvite,
linkedinSend,
linkedinVoiceNote,
linkedinFollow,
linkedinLikeLastPost,
linkedinCommentLastPost,
linkedinEndorse,
linkedinWithdrawInvitation,
sendToAnotherCampaign,
conditional,
whatsappMessage,
sms
delay
integer

Delay in days before executing this step

subject
string

Email subject line (for email steps). Pass an empty string to remove it: the email then replies in the thread of the previous email sent to the lead in this campaign.

message
string

Content of the email or message (for email, linkedinInvite, linkedinSend, manual, phone, whatsappMessage, sms steps, and as the AI script of a linkedinVoiceNote step in ai record mode)

altMessage
string

The LinkedIn note sent instead of message in specific cases, with a meaning that depends on the step type. On linkedinInvite: the premium invitation note attached to the connection request, used when the sending account has LinkedIn Premium. On linkedinSend and linkedinVoiceNote: the out-of-network note, sent as a connection request when the lead is not a 1st-degree connection. Pass an empty string to clear it. LinkedIn caps a connection-request note at 200 characters on a free account and 300 on Premium or Sales Navigator. This endpoint does not enforce those caps, but an over-long note is a blocking step error: the campaign refuses to launch until it is shortened

altMessagePremium
string

For linkedinSend steps only. The premium variant of the out-of-network note, sent instead of altMessage when the sending LinkedIn account is Premium or Sales Navigator (300-character LinkedIn cap). Pass an empty string to clear it. Rejected with 400 on any other step type

title
string

Title or label for manual steps

method
enum<string>

HTTP method for API steps

Available options:
GET,
POST,
PUT,
DELETE,
PATCH
url
string

URL of the API endpoint to call (for api steps). Must start with http:// or https://

conditionKey
enum<string>

Condition key for conditional steps

Available options:
hasEmailAddress,
hasLinkedinUrl,
hasPhoneNumber,
customLeadInfo,
hasScore,
emailsOpened,
emailsClicked,
emailsUnsubscribed,
meetingBooked,
linkedinInviteAccepted,
linkedinOpened,
aircallDone,
linkedinNetworkCheck,
hasWhatsappAccount
delayType
enum<string>

Delay type for conditional steps

Available options:
within,
waitUntil
customField
string

For conditional steps keyed 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. $ and the reserved keys _id, teamId, campaignId, leadId, __proto__, constructor and prototype are refused.

customOperator
enum<string>

For conditional steps keyed customLeadInfo only. How the field is compared.

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

For conditional steps keyed customLeadInfo only. The value the field is compared to. Required for equal and contains, and refused for empty and notEmpty.

campaignId
string

Target campaign ID for sendToAnotherCampaign steps. The campaign must exist and not be archived

leadAction
enum<string>

Applies to sendToAnotherCampaign steps only. What happens to the lead in the SOURCE campaign once it has been moved to the target one. continue keeps it running the remaining steps, pause pauses it, stop ends the source campaign for it. Omitted leaves the step without a value, which behaves as continue; a step added from the lemlist UI defaults to stop. A transfer that fails always pauses the lead, whatever this says.

Available options:
continue,
pause,
stop
images
string<uri>[]

Public HTTPS URLs of images to attach to a linkedinInvite or linkedinSend step. Replaces the step's current images — pass an empty array to clear them. Allowed MIME types: image/png, image/jpeg, image/gif. Up to 20 MB per file, and up to 6 items total combined with videos.

videos
string<uri>[]

Public HTTPS URLs of videos to attach to a linkedinInvite or linkedinSend step. Replaces the step's current videos — pass an empty array to clear them. Allowed MIME types: video/mp4, video/quicktime. Up to 20 MB per file, and up to 6 items total combined with images.

skillName
string

Name of the LinkedIn skill to endorse on the lead's profile. Applies to linkedinEndorse steps only.

endorseAnyFallback
boolean

Applies to linkedinEndorse steps only. When true and the named skill is not on the lead's profile, lemlist falls back to endorsing any available skill.

recordMode
enum<string>

Applies to linkedinVoiceNote steps only. Determines how the audio is sourced. manual (default) means the user records the audio themselves from the lemlist UI after step creation; ai means lemlist generates the audio from a text template provided in the lemlist UI.

Available options:
manual,
ai

Response

Success

_id
string
type
string
delay
integer
emailTemplateId
string
message
string