Reset Step Personalization for Lead
curl --request DELETE \
--url https://api.lemlist.com/api/campaigns/{campaignId}/leads/{leadIdOrEmail}/steps/{stepId}/personalization \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/campaigns/{campaignId}/leads/{leadIdOrEmail}/steps/{stepId}/personalization"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/campaigns/{campaignId}/leads/{leadIdOrEmail}/steps/{stepId}/personalization', 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}/personalization")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.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}/personalization",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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;
}{
"reset": true
}{
"error": "Validation error",
"code": "VALIDATION_ERROR"
}"The authentication you supplied is incorrect"{
"error": "Lead not found in this campaign",
"code": "REVIEW_DRAFT_LEAD_NOT_FOUND"
}{
"error": "The lead already reached this step: its message can no longer be personalized",
"code": "REVIEW_DRAFT_STEP_ALREADY_REACHED"
}{
"error": "This step type cannot be personalized for a lead",
"code": "REVIEW_DRAFT_STEP_UNSUPPORTED"
}Leads
Reset Step Personalization for Lead
Removes a lead’s personalization of one campaign step.
DELETE
/
campaigns
/
{campaignId}
/
leads
/
{leadIdOrEmail}
/
steps
/
{stepId}
/
personalization
Reset Step Personalization for Lead
curl --request DELETE \
--url https://api.lemlist.com/api/campaigns/{campaignId}/leads/{leadIdOrEmail}/steps/{stepId}/personalization \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/campaigns/{campaignId}/leads/{leadIdOrEmail}/steps/{stepId}/personalization"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/campaigns/{campaignId}/leads/{leadIdOrEmail}/steps/{stepId}/personalization', 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}/personalization")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.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}/personalization",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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;
}{
"reset": true
}{
"error": "Validation error",
"code": "VALIDATION_ERROR"
}"The authentication you supplied is incorrect"{
"error": "Lead not found in this campaign",
"code": "REVIEW_DRAFT_LEAD_NOT_FOUND"
}{
"error": "The lead already reached this step: its message can no longer be personalized",
"code": "REVIEW_DRAFT_STEP_ALREADY_REACHED"
}{
"error": "This step type cannot be personalized for a lead",
"code": "REVIEW_DRAFT_STEP_UNSUPPORTED"
}The lead receives the step’s shared message again, and the step’s A/B test
applies to the lead again. Same as Reset override in the lemlist review
page. The personalized content cannot be recovered.
The call is idempotent:
reset is false when the step was not personalized
for the lead. Once the lead reached the step (sent, skipped or ignored), the
request answers 409.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 personalization is removed. reset is false when the step was not personalized for the lead: an idempotent no-op, not an error.
Was this page helpful?