Skip Step for Lead
curl --request POST \
--url https://api.lemlist.com/api/campaigns/{campaignId}/leads/{leadIdOrEmail}/steps/{stepId}/skip \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/campaigns/{campaignId}/leads/{leadIdOrEmail}/steps/{stepId}/skip"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/campaigns/{campaignId}/leads/{leadIdOrEmail}/steps/{stepId}/skip', 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}/leads/{leadIdOrEmail}/steps/{stepId}/skip")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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}/leads/{leadIdOrEmail}/steps/{stepId}/skip",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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;
}{
"skipped": true
}{
"error": "Route bad request",
"code": "ROUTE_BAD_REQUEST"
}"The authentication you supplied is incorrect"{
"error": "Lead not found in this campaign",
"code": "STEP_SKIP_LEAD_NOT_FOUND"
}{
"error": "A condition step cannot be skipped",
"code": "STEP_SKIP_STEP_IS_CONDITION"
}Leads
Skip Step for Lead
Skips one step of a running campaign for a single lead.
POST
/
campaigns
/
{campaignId}
/
leads
/
{leadIdOrEmail}
/
steps
/
{stepId}
/
skip
Skip Step for Lead
curl --request POST \
--url https://api.lemlist.com/api/campaigns/{campaignId}/leads/{leadIdOrEmail}/steps/{stepId}/skip \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/campaigns/{campaignId}/leads/{leadIdOrEmail}/steps/{stepId}/skip"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/campaigns/{campaignId}/leads/{leadIdOrEmail}/steps/{stepId}/skip', 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}/leads/{leadIdOrEmail}/steps/{stepId}/skip")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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}/leads/{leadIdOrEmail}/steps/{stepId}/skip",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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;
}{
"skipped": true
}{
"error": "Route bad request",
"code": "ROUTE_BAD_REQUEST"
}"The authentication you supplied is incorrect"{
"error": "Lead not found in this campaign",
"code": "STEP_SKIP_LEAD_NOT_FOUND"
}{
"error": "A condition step cannot be skipped",
"code": "STEP_SKIP_STEP_IS_CONDITION"
}The lead is not stopped: the step never runs and the lead continues with the
next one after that step’s own delay. A step the lead already ran is
unaffected — nothing already sent changes.
A skip cannot be undone, here or in the lemlist app. Condition steps can never
be skipped (
422).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 or email of the lead
The unique identifier of the step, from GET /campaigns/{campaignId}/sequences
Response
The step is skipped. skipped is false when it was already skipped: an idempotent no-op, not an error.
Was this page helpful?