curl --request POST \
--url https://api.lemlist.com/api/campaigns/{campaignId}/steps/{stepId}/skip-for-leads \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"leads": [
"lea_A1B2C3D4E5F6G7H8I",
"jane@example.com",
"ghost@example.com"
]
}
'import requests
url = "https://api.lemlist.com/api/campaigns/{campaignId}/steps/{stepId}/skip-for-leads"
payload = { "leads": ["lea_A1B2C3D4E5F6G7H8I", "jane@example.com", "ghost@example.com"] }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({leads: ['lea_A1B2C3D4E5F6G7H8I', 'jane@example.com', 'ghost@example.com']})
};
fetch('https://api.lemlist.com/api/campaigns/{campaignId}/steps/{stepId}/skip-for-leads', 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}/steps/{stepId}/skip-for-leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"leads\": [\n \"lea_A1B2C3D4E5F6G7H8I\",\n \"jane@example.com\",\n \"ghost@example.com\"\n ]\n}"
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}/steps/{stepId}/skip-for-leads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'leads' => [
'lea_A1B2C3D4E5F6G7H8I',
'jane@example.com',
'ghost@example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"total": 3,
"skipped": 2,
"alreadySkipped": 0,
"notFound": [
"ghost@example.com"
],
"results": [
{
"lead": "lea_A1B2C3D4E5F6G7H8I",
"status": "skipped"
},
{
"lead": "jane@example.com",
"status": "skipped"
},
{
"lead": "ghost@example.com",
"status": "not_found"
}
]
}{
"error": "At most 100 leads per call",
"code": "STEP_SKIP_TOO_MANY_LEADS"
}The authentication you supplied is incorrect{
"error": "Step not found in this campaign",
"code": "STEP_SKIP_STEP_NOT_FOUND"
}{
"error": "A condition step cannot be skipped",
"code": "STEP_SKIP_STEP_IS_CONDITION"
}Skip Step for Leads
Skips one step of a running campaign for a list of leads.
curl --request POST \
--url https://api.lemlist.com/api/campaigns/{campaignId}/steps/{stepId}/skip-for-leads \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"leads": [
"lea_A1B2C3D4E5F6G7H8I",
"jane@example.com",
"ghost@example.com"
]
}
'import requests
url = "https://api.lemlist.com/api/campaigns/{campaignId}/steps/{stepId}/skip-for-leads"
payload = { "leads": ["lea_A1B2C3D4E5F6G7H8I", "jane@example.com", "ghost@example.com"] }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({leads: ['lea_A1B2C3D4E5F6G7H8I', 'jane@example.com', 'ghost@example.com']})
};
fetch('https://api.lemlist.com/api/campaigns/{campaignId}/steps/{stepId}/skip-for-leads', 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}/steps/{stepId}/skip-for-leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"leads\": [\n \"lea_A1B2C3D4E5F6G7H8I\",\n \"jane@example.com\",\n \"ghost@example.com\"\n ]\n}"
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}/steps/{stepId}/skip-for-leads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'leads' => [
'lea_A1B2C3D4E5F6G7H8I',
'jane@example.com',
'ghost@example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"total": 3,
"skipped": 2,
"alreadySkipped": 0,
"notFound": [
"ghost@example.com"
],
"results": [
{
"lead": "lea_A1B2C3D4E5F6G7H8I",
"status": "skipped"
},
{
"lead": "jane@example.com",
"status": "skipped"
},
{
"lead": "ghost@example.com",
"status": "not_found"
}
]
}{
"error": "At most 100 leads per call",
"code": "STEP_SKIP_TOO_MANY_LEADS"
}The authentication you supplied is incorrect{
"error": "Step not found in this campaign",
"code": "STEP_SKIP_STEP_NOT_FOUND"
}{
"error": "A condition step cannot be skipped",
"code": "STEP_SKIP_STEP_IS_CONDITION"
}already_skipped, an item that matches no lead of the
campaign answers not_found. Only a request that must be fixed as a whole is
refused, such as more than 100 items (400, never truncated) or a condition
step (422).
A skip cannot be undone, here or in the lemlist app. To skip a step for every
lead of the campaign, including leads added later, use
Skip Step for Everyone
instead.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
The unique identifier of the step, from GET /campaigns/{campaignId}/sequences
Body
The leads to skip the step for: 1 to 100 items. An email is matched inside the campaign, case-insensitively. A repeated item is read once. An email is not URL-decoded: send it as it is stored.
1 - 100 elementsA lead id (lea_...) or the lead's email
Response
One results row per distinct item sent, echoing it as sent. Per-item outcomes never fail the call: skipped, already_skipped (an idempotent no-op) or not_found (no lead of this campaign matches). Counts are per lead: two items naming the same lead both echo its status, and the lead counts once.
Was this page helpful?