{
"_id": "stp_V0JHmSpWiO0rxHUkz",
"type": "linkedinInvite",
"delay": 0,
"emailTemplateId": "etp_HZvLoLNEwdJ8Vu0w7",
"message": "Hello, I want to..."
}"Bad team""The authentication you supplied is incorrect"{
"error": "Upgrade your plan to use this feature",
"code": "upper-plan-required"
}{
"error": "Every branch of this condition needs a value once leads have entered the campaign",
"code": "incomplete-branch-on-sequence-in-use"
}Update Sequence Step
Updates an existing step within a sequence.
{
"_id": "stp_V0JHmSpWiO0rxHUkz",
"type": "linkedinInvite",
"delay": 0,
"emailTemplateId": "etp_HZvLoLNEwdJ8Vu0w7",
"message": "Hello, I want to..."
}"Bad team""The authentication you supplied is incorrect"{
"error": "Upgrade your plan to use this feature",
"code": "upper-plan-required"
}{
"error": "Every branch of this condition needs a value once leads have entered the campaign",
"code": "incomplete-branch-on-sequence-in-use"
}- 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
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…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 acode in the body next to the message, so a rejected edit can be told apart
from a transport failure.
Supported Step Types
| Type | Editable Fields | Description |
|---|---|---|
email | subject, message, delay | Sends an email to the lead |
manual | title, message, delay | Manual task to be performed by the user |
phone | message, delay | Reminder to make a phone call |
api | method, url, delay | Makes an API call |
linkedinVisit | delay | Simulates a profile visit on LinkedIn |
linkedinInvite | message, altMessage, images, videos, delay | Sends a LinkedIn invite with message |
linkedinSend | message, altMessage, altMessagePremium, images, videos, delay | Sends a LinkedIn message |
linkedinVoiceNote | message, altMessage, delay, recordMode | Sends a LinkedIn voice note. Audio is either recorded manually or AI-generated from a text template, depending on recordMode |
linkedinFollow | delay | Follows the lead on LinkedIn |
linkedinLikeLastPost | delay | Likes the lead’s most recent LinkedIn post |
linkedinCommentLastPost | delay | Posts an AI-generated comment on the lead’s most recent LinkedIn post |
linkedinEndorse | delay, skillName, endorseAnyFallback | Endorses a skill on the lead’s LinkedIn profile |
linkedinWithdrawInvitation | delay | Withdraws a pending LinkedIn invite |
sendToAnotherCampaign | campaignId | Sends the lead to another campaign |
conditional | conditionKey, delayType, delay, customField, customOperator, customValue | Triggers the next step based on lead behavior |
whatsappMessage | message, delay | Sends a WhatsApp message |
sms | message, delay | Sends an SMS to the lead |
Request Body
Only include the fields you want to update. Required fields are not enforced here.| Field | Type | Applies To | Description |
|---|---|---|---|
subject | string | email | Email subject line. Maximum 400 characters (applied to the raw template, including any Liquid syntax) |
message | string | email, linkedin*, manual, phone, whatsappMessage, sms | Message text |
altMessage | string | linkedinInvite, linkedinSend, linkedinVoiceNote | The premium invitation note on an invite, the out-of-network note on the other two. Pass an empty string to clear it. See LinkedIn invitation notes on Add Step |
altMessagePremium | string | linkedinSend | The premium variant of the out-of-network note. Pass an empty string to clear it. See LinkedIn invitation notes on Add Step |
title | string | manual | Title for manual task. Maximum 400 characters |
method | string | api | One of GET, POST, PUT, DELETE, PATCH |
url | string | api | Valid HTTP/HTTPS URL |
delay | integer | all except sendToAnotherCampaign | Delay before this step, in days. Must be between 0 and 1500 |
delayType | string | conditional | One of within, waitUntil |
conditionKey | string | conditional | See supported condition keys below |
customField | string | conditional keyed customLeadInfo | The field to test. A bare name reads as a lead variable (jobTitle becomes variables.jobTitle); prefix with fields. for a contact field |
customOperator | string | conditional keyed customLeadInfo | One of equal, contains, empty, notEmpty |
customValue | string | conditional keyed customLeadInfo | The value the field is compared to. Required for equal and contains, refused for empty and notEmpty |
campaignId | string | sendToAnotherCampaign | ID of destination campaign |
leadAction | string | sendToAnotherCampaign | What happens to the lead in the source campaign once it has been moved. One of continue, pause, stop. See What happens to the transferred lead on Add Step |
images | array of strings | linkedinInvite, linkedinSend | Public HTTPS URLs of images to attach. Replaces the step’s current images — pass [] to clear them. See the LinkedIn media constraints on Add Step |
videos | array of strings | linkedinInvite, linkedinSend | Public HTTPS URLs of videos to attach. Replaces the step’s current videos — pass [] to clear them. See the LinkedIn media constraints on Add Step |
skillName | string | linkedinEndorse | Name of the LinkedIn skill to endorse on the lead’s profile |
endorseAnyFallback | boolean | linkedinEndorse | When true and the named skill is not on the lead’s profile, lemlist falls back to endorsing any available skill |
recordMode | string | linkedinVoiceNote | One of manual (user records the audio after step creation; default) or ai (audio is generated from a text template provided in the lemlist UI) |
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
Forconditional steps:
hasEmailAddresshasLinkedinUrlhasPhoneNumbercustomLeadInfohasScoreemailsOpenedemailsClickedemailsUnsubscribedmeetingBookedlinkedinInviteAcceptedlinkedinOpenedaircallDonelinkedinNetworkCheckhasWhatsappAccount
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
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
The unique identifier of the step
Body
The type of step (required but cannot be changed - must match the existing step type)
email, manual, phone, api, linkedinVisit, linkedinInvite, linkedinSend, linkedinVoiceNote, linkedinFollow, linkedinLikeLastPost, linkedinCommentLastPost, linkedinEndorse, linkedinWithdrawInvitation, sendToAnotherCampaign, conditional, whatsappMessage, sms Delay in days before executing this step
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.
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)
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
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 or label for manual steps
HTTP method for API steps
GET, POST, PUT, DELETE, PATCH URL of the API endpoint to call (for api steps). Must start with http:// or https://
Condition key for conditional steps
hasEmailAddress, hasLinkedinUrl, hasPhoneNumber, customLeadInfo, hasScore, emailsOpened, emailsClicked, emailsUnsubscribed, meetingBooked, linkedinInviteAccepted, linkedinOpened, aircallDone, linkedinNetworkCheck, hasWhatsappAccount Delay type for conditional steps
within, waitUntil 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.
For conditional steps keyed customLeadInfo only. How the field is compared.
equal, contains, empty, notEmpty For conditional steps keyed customLeadInfo only. The value the field is compared to. Required for equal and contains, and refused for empty and notEmpty.
Target campaign ID for sendToAnotherCampaign steps. The campaign must exist and not be archived
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.
continue, pause, stop 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.
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.
Name of the LinkedIn skill to endorse on the lead's profile. Applies to linkedinEndorse steps only.
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.
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.
manual, ai Was this page helpful?