Skip to main content
PATCH
/
sequences
/
{sequenceId}
/
steps
/
{stepId}
curl --request PATCH \
  --url https://api.lemlist.com/api/sequences/{sequenceId}/steps/{stepId} \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "email",
  "subject": "{{firstName}}, following up on our conversation",
  "message": "<p>Hi {{firstName}},</p><p>Just wanted to circle back on our previous email. Have you had a chance to review it?</p><p>Best,<br>{{senderName}}</p>",
  "delay": 2
}'
{
  "_id": "stp_Z2539g5BB4qCoZBgf",
  "type": "linkedinInvite",
  "delay": 0,
  "emailTemplateId": "etp_xNieSJDTnd2YZ46LF",
  "message": "Hello, I want to..."
}
This endpoint uses the Step object.
Update an existing step inside a sequence. 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…

Supported Step Types

TypeEditable FieldsDescription
emailsubject, message, delaySends an email to the lead
manualtitle, message, delayManual task to be performed by the user
phonemessage, delayReminder to make a phone call
apimethod, url, delayMakes an API call
linkedinVisitdelaySimulates a profile visit on LinkedIn
linkedinInvitemessage, delaySends a LinkedIn invite with message
linkedinSendmessage, altMessage, delaySends a LinkedIn message
sendToAnotherCampaigncampaignIdSends the lead to another campaign
conditionalconditionKey, delayType, delayTriggers the next step based on lead behavior
whatsappMessagemessage, delaySends a WhatsApp message

Request Body

Only include the fields you want to update. Required fields are not enforced here.
FieldTypeApplies ToDescription
subjectstringemailEmail subject line
messagestringemail, linkedin*, manual, phone, whatsappMessageMessage text
altMessagestringlinkedinSendFallback LinkedIn message
titlestringmanualTitle for manual task
methodstringapiOne of GET, POST, PUT, DELETE, PATCH
urlstringapiValid HTTP/HTTPS URL
delayintegerall except sendToAnotherCampaignDelay before this step in hours
delayTypestringconditionalOne of within, waitUntil
conditionKeystringconditionalSee supported condition keys below
campaignIdstringsendToAnotherCampaignID of destination campaign

Supported Condition Keys

For conditional steps:
  • emailsOpened
  • emailsClicked
  • emailsUnsubscribed
  • meetingBooked
  • linkedinInviteAccepted
  • linkedinOpened

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,
sendToAnotherCampaign,
conditional,
whatsappMessage
delay
integer

Delay in days before executing this step

subject
string

Email subject line (for email steps)

message
string

Content of the email or message (for email, linkedinInvite, linkedinSend, manual, phone, whatsappMessage steps)

altMessage
string

Alternate message for linkedinSend steps

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:
emailsOpened,
emailsClicked,
emailsUnsubscribed,
meetingBooked,
linkedinInviteAccepted,
linkedinOpened,
hasWhatsappAccount
delayType
enum<string>

Delay type for conditional steps

Available options:
within,
waitUntil
campaignId
string

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

Response

Success

_id
string
type
string
delay
integer
emailTemplateId
string
message
string