lemlist Sequences API
Campaign sequences, their steps, and A/B test variants on email steps.
Campaign sequences, their steps, and A/B test variants on email steps.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/lemlist-sequences-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Lemlist Sequences API
version: 1.0.0
description: 'Operations tagged Sequences across 3 of this provider''s published API definitions: lemlist-openapi-v1-legacy.json, lemlist-openapi-v2.json, lemlist-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.lemlist.com/api
tags:
- name: Sequences
paths:
/campaigns/{campaignId}/sequences:
parameters:
- name: campaignId
in: path
required: true
example: '{{campaignId}}'
schema:
type: string
get:
summary: Retrieve campaign sequences
tags:
- Sequences
parameters:
- name: Content
in: header
required: false
example: application/json
schema:
type: string
responses:
'200':
headers:
Content-Type:
schema:
type: string
example: application/json
description: Success
content:
application/json:
schema:
type: object
properties:
seq_p9qaCXrptS8XcPPNK:
type: object
properties:
_id:
type: string
steps:
type: array
items:
type: object
properties:
_id:
type: string
type:
type: string
delay:
type: integer
emailTemplateId:
type: string
index:
type: integer
message:
type: string
level:
type: integer
seq_jgBhmiQYyRd3gW8Sb:
type: object
properties:
_id:
type: string
parentId:
type: string
conditionalStepIndex:
type: integer
steps:
type: array
items:
type: object
properties:
_id:
type: string
type:
type: string
delay:
type: integer
emailTemplateId:
type: string
index:
type: integer
message:
type: string
level:
type: integer
example:
seq_p9qaCXrptS8XcPPNK:
_id: seq_p9qaCXrptS8XcPPNK
steps:
- _id: stp_wHzzFZntP2FvJbeb6
type: linkedinInvite
delay: 0
emailTemplateId: etp_5qsoi5kneNkakmPd5
index: 1
message: Test invite message
- _id: stp_EtKsaSW62vyFhMME4
type: conditional
conditions:
- sequenceId: seq_jgBhmiQYyRd3gW8Sb
label: Accepted invite
key: linkedinInviteAccepted
delay: 1
delayType: waitUntil
- sequenceId: seq_ET4kSR3GAkcRqp2TE
fallback: true
index: 2
level: 0
seq_jgBhmiQYyRd3gW8Sb:
_id: seq_jgBhmiQYyRd3gW8Sb
parentId: seq_p9qaCXrptS8XcPPNK
conditionalStepIndex: 1
steps:
- _id: stp_vMqX4wgSmqMXd2env
type: linkedinSend
delay: 1
emailTemplateId: etp_DJqHmozZtYz4JWyyB
index: 3
message: Test message
level: 1
servers:
- url: https://api.lemlist.com/api
/sequences/{sequenceId}/steps:
parameters:
- name: sequenceId
in: path
required: true
example: '{{sequenceId}}'
schema:
type: string
post:
summary: Add step to sequence
tags:
- Sequences
parameters:
- name: Content
in: header
required: false
example: application/json
schema:
type: string
responses:
'200':
headers:
Content-Type:
schema:
type: string
example: application/json
description: Success
content:
application/json:
schema:
type: object
properties:
_id:
type: string
type:
type: string
delay:
type: integer
emailTemplateId:
type: string
message:
type: string
example:
_id: stp_Z2539g5BB4qCoZBgf
type: linkedinInvite
delay: 2
emailTemplateId: etp_LWuaE5JG4Bm4riPf5
message: Hello, I would like....
requestBody:
content:
application/json:
schema:
type: object
example: {}
servers:
- url: https://api.lemlist.com/api
/sequences/{sequenceId}/steps/{stepId}:
parameters:
- name: sequenceId
in: path
required: true
example: '{{sequenceId}}'
schema:
type: string
- name: stepId
in: path
required: true
example: '{{stepId}}'
schema:
type: string
patch:
summary: Update sequence step
tags:
- Sequences
parameters:
- name: Content
in: header
required: false
example: application/json
schema:
type: string
responses:
'200':
headers:
Content-Type:
schema:
type: string
example: application/json
description: Success
content:
application/json:
schema:
type: object
properties:
_id:
type: string
type:
type: string
delay:
type: integer
emailTemplateId:
type: string
message:
type: string
example:
_id: stp_Z2539g5BB4qCoZBgf
type: linkedinInvite
delay: 0
emailTemplateId: etp_xNieSJDTnd2YZ46LF
message: Hello, I want to....
requestBody:
content:
application/json:
schema:
type: object
example: {}
delete:
summary: Delete sequence step
tags:
- Sequences
parameters:
- name: Content
in: header
required: false
example: application/json
schema:
type: string
responses:
'200':
headers:
Content-Type:
schema:
type: string
example: application/json
description: Success
content:
application/json:
schema:
type: object
properties:
ok:
type: boolean
example:
ok: true
requestBody:
content:
application/json:
schema:
type: object
example: {}
servers:
- url: https://api.lemlist.com/api
/sequences/{sequenceId}/steps/{stepId}/ab-test:
parameters:
- name: sequenceId
in: path
required: true
description: The unique identifier of the sequence
example: seq_lkCSKd32qSZZTe5Ru
schema:
type: string
- name: stepId
in: path
required: true
description: The unique identifier of the step
example: stp_V0JHmSpWiO0rxHUkz
schema:
type: string
post:
summary: Create A/B Test Variant
tags:
- Sequences
description: Creates variant B of an A/B test on an email step, prefilled from variant A, and starts the test (leads are split between A and B). Requires the Email Pro plan.
parameters: []
responses:
'200':
description: Variant B created
content:
application/json:
schema:
type: object
properties:
stepId:
type: string
abTest:
oneOf:
- type: boolean
- type: string
enum:
- A
- B
emailTemplateBId:
type: string
description: Email template ID of variant B
subject:
type: string
description: Variant B email subject
message:
type: string
description: Variant B email body (HTML)
altMessage:
type: string
cc:
type: array
items:
type: string
plainText:
type: boolean
example:
stepId: stp_V0JHmSpWiO0rxHUkz
abTest: true
emailTemplateBId: etp_9aZ2k1QwErTyUiOp3
subject: Quick question, {{firstName}}
message: <div>Hi {{firstName}}, ...</div>
'400':
description: Bad request (e.g. step is not an email step, has no template, already runs an A/B test, or the campaign is running)
content:
text/plain:
example: A/B test already exists on this step
'401':
description: The authentication you supplied is incorrect
content:
text/plain:
example: The authentication you supplied is incorrect
'402':
description: A/B testing requires at least the Email Pro plan
content:
text/plain:
example: route is available starting emailPro plan
'404':
description: Sequence, step, or A/B test variant not found
content:
text/plain:
example: No A/B test variant on this step
'405':
description: Method not allowed
security:
- basicAuth: []
get:
summary: Get A/B Test Variant
tags:
- Sequences
description: Returns variant B (subject, message, config) of the A/B test on an email step. Requires the Email Pro plan.
parameters: []
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
stepId:
type: string
abTest:
oneOf:
- type: boolean
- type: string
enum:
- A
- B
emailTemplateBId:
type: string
description: Email template ID of variant B
subject:
type: string
description: Variant B email subject
message:
type: string
description: Variant B email body (HTML)
altMessage:
type: string
cc:
type: array
items:
type: string
plainText:
type: boolean
example:
stepId: stp_V0JHmSpWiO0rxHUkz
abTest: true
emailTemplateBId: etp_9aZ2k1QwErTyUiOp3
subject: Quick question, {{firstName}}
message: <div>Hi {{firstName}}, ...</div>
'401':
description: The authentication you supplied is incorrect
content:
text/plain:
example: The authentication you supplied is incorrect
'402':
description: A/B testing requires at least the Email Pro plan
content:
text/plain:
example: route is available starting emailPro plan
'404':
description: Sequence, step, or A/B test variant not found
content:
text/plain:
example: No A/B test variant on this step
'405':
description: Method not allowed
security:
- basicAuth: []
patch:
summary: Update A/B Test Variant
tags:
- Sequences
description: Edits variant B content/config of the A/B test on an email step. Only the provided fields are updated. Requires the Email Pro plan.
parameters: []
requestBody:
content:
application/json:
schema:
type: object
properties:
subject:
type: string
description: Variant B email subject. Maximum 400 characters
message:
type: string
description: Variant B email body (HTML)
altMessage:
type: string
cc:
type: array
items:
type: string
plainText:
type: boolean
example:
subject: New subject B
message: <div>New body B</div>
responses:
'200':
description: Variant B updated
content:
application/json:
schema:
type: object
properties:
stepId:
type: string
abTest:
oneOf:
- type: boolean
- type: string
enum:
- A
- B
emailTemplateBId:
type: string
description: Email template ID of variant B
subject:
type: string
description: Variant B email subject
message:
type: string
description: Variant B email body (HTML)
altMessage:
type: string
cc:
type: array
items:
type: string
plainText:
type: boolean
example:
stepId: stp_V0JHmSpWiO0rxHUkz
abTest: true
emailTemplateBId: etp_9aZ2k1QwErTyUiOp3
subject: Quick question, {{firstName}}
message: <div>Hi {{firstName}}, ...</div>
'400':
description: Bad request (invalid request body)
content:
text/plain:
example: 'Match error: Expected string, got number'
'401':
description: The authentication you supplied is incorrect
content:
text/plain:
example: The authentication you supplied is incorrect
'402':
description: A/B testing requires at least the Email Pro plan
content:
text/plain:
example: route is available starting emailPro plan
'404':
description: Sequence, step, or A/B test variant not found
content:
text/plain:
example: No A/B test variant on this step
'405':
description: Method not allowed
security:
- basicAuth: []
delete:
summary: Delete A/B Test Variant
tags:
- Sequences
description: Deletes a variant of the A/B test and ends the test. Deleting `B` (default) drops variant B; deleting `A` promotes variant B to A. Requires the Email Pro plan.
parameters:
- name: variant
in: query
required: false
description: Which variant to delete. Defaults to `B`.
schema:
type: string
enum:
- A
- B
default: B
responses:
'200':
description: Variant deleted
content:
application/json:
schema:
type: object
properties:
ok:
type: boolean
example:
ok: true
'400':
description: You cannot edit this step because the campaign is running
content:
text/plain:
example: You cannot edit this step because the campaign is running
'401':
description: The authentication you supplied is incorrect
content:
text/plain:
example: The authentication you supplied is incorrect
'402':
description: A/B testing requires at least the Email Pro plan
content:
text/plain:
example: route is available starting emailPro plan
'404':
description: Sequence, step, or A/B test variant not found
content:
text/plain:
example: No A/B test variant on this step
'405':
description: Method not allowed
security:
- basicAuth: []
servers:
- url: https://api.lemlist.com/api
/sequences/{sequenceId}/steps/{stepId}/ab-test/winner:
parameters:
- name: sequenceId
in: path
required: true
description: The unique identifier of the sequence
example: seq_lkCSKd32qSZZTe5Ru
schema:
type: string
- name: stepId
in: path
required: true
description: The unique identifier of the step
example: stp_V0JHmSpWiO0rxHUkz
schema:
type: string
post:
summary: Select A/B Test Winner
tags:
- Sequences
description: Selects the winning variant of the A/B test. The winning template is then sent to all remaining leads going through the campaign. Requires the Email Pro plan.
parameters: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- variant
properties:
variant:
type: string
enum:
- A
- B
description: The winning variant
example:
variant: B
responses:
'200':
description: Winner selected
content:
application/json:
schema:
type: object
properties:
stepId:
type: string
abTest:
type: string
enum:
- A
- B
example:
stepId: stp_V0JHmSpWiO0rxHUkz
abTest: B
'400':
description: A winning variant has already been selected, or the variant is invalid
content:
text/plain:
example: A winning variant has already been selected for this step
'401':
description: The authentication you supplied is incorrect
content:
text/plain:
example: The authentication you supplied is incorrect
'402':
description: A/B testing requires at least the Email Pro plan
content:
text/plain:
example: route is available starting emailPro plan
'404':
description: Sequence, step, or A/B test variant not found
content:
text/plain:
example: No A/B test variant on this step
'405':
description: Method not allowed
security:
- basicAuth: []
servers:
- url: https://api.lemlist.com/api
components:
securitySchemes:
basicAuth:
type: http
scheme: basic
x-refined-from:
- lemlist-openapi-v1-legacy.json
- lemlist-openapi-v2.json
- lemlist-openapi.yml