Add Step to Sequence
Creates a step or condition within a campaign sequence.
/api/campaigns/{campaignId}/sequences.
Adding Steps
To add a new step to a sequence, call the API with the sequence ID in the parameters and the step details in the request body. For example, adding a LinkedIn invite step:Adding Conditions
To add a condition to a sequence, you must provide theconditionKey and type conditional along with the required fields. The API will return a condition with an array of condition sequences, where you can call the same API again to add steps to those sequences.
For example, creating a LinkedIn invite condition:
/api/sequences/seq_jacL5GNH3YpNnuNQ2/steps to add a send step if the invite is accepted:
Step Types and Required Fields
The table below summarizes the required and optional fields for each step type. Note that all step requests must include a commontype field.
delayType is not "within", the delay field is not required.linkedinVoiceNote steps are created as skeletons via the API: the audio payload itself is not accepted here and must be added afterwards from the lemlist UI. The recordMode field controls how the audio is sourced — with manual (default), a user records the note themselves; with ai, a user provides a text template that lemlist converts to audio at send time.All Request Body Fields
LinkedIn media constraints
When you passimages or videos to a linkedinInvite or linkedinSend step, each URL must be a publicly reachable HTTPS URL. lemlist fetches the file, validates it, and re-hosts it before attaching it to the LinkedIn message.
4xx/5xx status with one of the following error codes:
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
Body
The type of step to create
email, manual, phone, api, linkedinVisit, linkedinInvite, linkedinSend, linkedinVoiceNote, linkedinFollow, linkedinLikeLastPost, linkedinCommentLastPost, linkedinEndorse, linkedinWithdrawInvitation, sendToAnotherCampaign, conditional, whatsappMessage, sms The position within the sequence to insert the new step (≥ -1). If omitted or greater than the number of steps, the new step is added to the end
Delay in days before executing this step. Defaults to 0 for the first step and 1 for subsequent steps
Email subject line (required for email steps)
Content of the email or message (used for email, linkedinInvite, linkedinSend, manual, phone, whatsappMessage, sms steps). Required for linkedinSend, whatsappMessage, and sms
Alternate message for linkedinSend steps
Title or label for manual steps
HTTP method for API steps
GET, POST, PUT, DELETE, PATCH URL of the API endpoint to call (required for api steps). Must start with http:// or https://
Condition key for conditional steps
hasEmailAddress, hasLinkedinUrl, hasPhoneNumber, hasScore, emailsOpened, emailsClicked, emailsUnsubscribed, meetingBooked, linkedinInviteAccepted, linkedinOpened, aircallDone, linkedinNetworkCheck, hasWhatsappAccount Delay type for conditional steps
within, waitUntil Target campaign ID for sendToAnotherCampaign steps. The campaign must exist and not be archived
Public HTTPS URLs of images to attach to a linkedinInvite or linkedinSend step. lemlist downloads each file and re-hosts it. 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. lemlist downloads each file and re-hosts it. 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