Get Campaign Sequences
curl --request GET \
--url https://api.lemlist.com/api/campaigns/{campaignId}/sequences \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/campaigns/{campaignId}/sequences"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/campaigns/{campaignId}/sequences', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api.lemlist.com/api/campaigns/{campaignId}/sequences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/campaigns/{campaignId}/sequences",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"seq_rH5RD3fMkkt2gM3YC": {
"_id": "seq_rH5RD3fMkkt2gM3YC",
"steps": [
{
"_id": "stp_sFUj6keaSz9wr049M",
"delay": 0,
"emailTemplateId": "etp_ahlbc2yafFyu728H8",
"type": "linkedinSend",
"index": 1,
"sequenceId": "seq_rH5RD3fMkkt2gM3YC",
"sequenceStep": 0,
"message": "Hey {{firstName}}, \n\nwe're launching an event, a place where people can regularly meet, network, and learn from each other. We would love it if you could join us for a drink & chat next week. What do you say? 😊"
},
{
"_id": "stp_qsTl0LO6zkQQJQqsP",
"delay": 1,
"emailTemplateId": "etp_HFjUGtyDxIOxgZYcG",
"index": 2,
"sequenceId": "seq_rH5RD3fMkkt2gM3YC",
"sequenceStep": 1,
"subject": "{{firstName}}, do we count on you for the event?",
"message": "<p style=\"margin: 0px; box-sizing: border-box;\">Hey {{firstName}},<br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"></p>\n<p style=\"margin: 0px; box-sizing: border-box;\">Do you have any plans for Thursday, 7pm?<br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"></p>\n<p style=\"margin: 0px; box-sizing: border-box;\">What about spending the evening with cool people by our office?<br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"></p>\n<p style=\"margin: 0px; box-sizing: border-box;\">We're launching an event, a place where people can regularly meet, network, and build connections that help them grow further 😊<br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"></p>\n<p style=\"margin: 0px; box-sizing: border-box;\">It would be really nice if we could count on you for the event- <a target=\"_blank\" style=\"color: rgb(0, 123, 255); text-decoration: none; background-color: transparent; user-select: auto; box-sizing: border-box;\" rel=\"noopener noreferrer\" href=\"{{event_link_to_send}}\">here's your invite</a> 🔥</p><p style=\"margin: 0px; box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"></p>\n<p style=\"margin: 0px; box-sizing: border-box;\">Can you make it?<br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"></p>\n<p style=\"margin: 0px; box-sizing: border-box;\">Sarah,</p><p style=\"margin: 0px; box-sizing: border-box;\">Head of Marketing</p>",
"type": "email"
},
{
"_id": "stp_pRcXzJDmOrBkFtNc3",
"delay": 1,
"emailTemplateId": "etp_3tjFTgdOMS6JL8U1g",
"index": 3,
"sequenceId": "seq_rH5RD3fMkkt2gM3YC",
"sequenceStep": 2,
"subject": "{{firstName}}, do we count on you for the event?",
"message": "<p style=\"margin: 0px; box-sizing: border-box;\">So, should I add you to the list of attendees?<br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"></p>\n<p style=\"margin: 0px; box-sizing: border-box;\">We'll meet around 7pm, have a drink and exchange with entrepreneurs, marketers, and salespeople.<br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"></p>\n<p style=\"margin: 0px; box-sizing: border-box;\"><a target=\"_blank\" style=\"color: rgb(0, 123, 255); text-decoration: none; background-color: transparent; user-select: auto; box-sizing: border-box;\" rel=\"noopener noreferrer\" href=\"{{event_link_to_send}}\">Here's the link</a> if you want to join!<br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"></p>\n<p style=\"margin: 0px; box-sizing: border-box;\">We would love to have you with us for this event!<br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\">Sarah</p><p style=\"margin: 0px; box-sizing: border-box;\">Head of Marketing</p>",
"type": "email"
}
],
"level": 0
}
}"Bad team""The authentication you supplied is incorrect""Campaign not found"Sequences
Get Campaign Sequences
Retrieves all sequences and their steps for a specific campaign.
GET
/
campaigns
/
{campaignId}
/
sequences
Get Campaign Sequences
curl --request GET \
--url https://api.lemlist.com/api/campaigns/{campaignId}/sequences \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/campaigns/{campaignId}/sequences"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/campaigns/{campaignId}/sequences', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api.lemlist.com/api/campaigns/{campaignId}/sequences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/campaigns/{campaignId}/sequences",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"seq_rH5RD3fMkkt2gM3YC": {
"_id": "seq_rH5RD3fMkkt2gM3YC",
"steps": [
{
"_id": "stp_sFUj6keaSz9wr049M",
"delay": 0,
"emailTemplateId": "etp_ahlbc2yafFyu728H8",
"type": "linkedinSend",
"index": 1,
"sequenceId": "seq_rH5RD3fMkkt2gM3YC",
"sequenceStep": 0,
"message": "Hey {{firstName}}, \n\nwe're launching an event, a place where people can regularly meet, network, and learn from each other. We would love it if you could join us for a drink & chat next week. What do you say? 😊"
},
{
"_id": "stp_qsTl0LO6zkQQJQqsP",
"delay": 1,
"emailTemplateId": "etp_HFjUGtyDxIOxgZYcG",
"index": 2,
"sequenceId": "seq_rH5RD3fMkkt2gM3YC",
"sequenceStep": 1,
"subject": "{{firstName}}, do we count on you for the event?",
"message": "<p style=\"margin: 0px; box-sizing: border-box;\">Hey {{firstName}},<br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"></p>\n<p style=\"margin: 0px; box-sizing: border-box;\">Do you have any plans for Thursday, 7pm?<br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"></p>\n<p style=\"margin: 0px; box-sizing: border-box;\">What about spending the evening with cool people by our office?<br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"></p>\n<p style=\"margin: 0px; box-sizing: border-box;\">We're launching an event, a place where people can regularly meet, network, and build connections that help them grow further 😊<br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"></p>\n<p style=\"margin: 0px; box-sizing: border-box;\">It would be really nice if we could count on you for the event- <a target=\"_blank\" style=\"color: rgb(0, 123, 255); text-decoration: none; background-color: transparent; user-select: auto; box-sizing: border-box;\" rel=\"noopener noreferrer\" href=\"{{event_link_to_send}}\">here's your invite</a> 🔥</p><p style=\"margin: 0px; box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"></p>\n<p style=\"margin: 0px; box-sizing: border-box;\">Can you make it?<br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"></p>\n<p style=\"margin: 0px; box-sizing: border-box;\">Sarah,</p><p style=\"margin: 0px; box-sizing: border-box;\">Head of Marketing</p>",
"type": "email"
},
{
"_id": "stp_pRcXzJDmOrBkFtNc3",
"delay": 1,
"emailTemplateId": "etp_3tjFTgdOMS6JL8U1g",
"index": 3,
"sequenceId": "seq_rH5RD3fMkkt2gM3YC",
"sequenceStep": 2,
"subject": "{{firstName}}, do we count on you for the event?",
"message": "<p style=\"margin: 0px; box-sizing: border-box;\">So, should I add you to the list of attendees?<br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"></p>\n<p style=\"margin: 0px; box-sizing: border-box;\">We'll meet around 7pm, have a drink and exchange with entrepreneurs, marketers, and salespeople.<br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"></p>\n<p style=\"margin: 0px; box-sizing: border-box;\"><a target=\"_blank\" style=\"color: rgb(0, 123, 255); text-decoration: none; background-color: transparent; user-select: auto; box-sizing: border-box;\" rel=\"noopener noreferrer\" href=\"{{event_link_to_send}}\">Here's the link</a> if you want to join!<br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"></p>\n<p style=\"margin: 0px; box-sizing: border-box;\">We would love to have you with us for this event!<br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\">Sarah</p><p style=\"margin: 0px; box-sizing: border-box;\">Head of Marketing</p>",
"type": "email"
}
],
"level": 0
}
}"Bad team""The authentication you supplied is incorrect""Campaign not found"This endpoint uses the Sequence object.
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 campaign
Response
Success
Object where each key is a sequence ID and each value is a sequence object
Show child attributes
Show child attributes
Was this page helpful?
⌘I