Delete A/B Test Variant
curl --request DELETE \
--url https://api.lemlist.com/api/sequences/{sequenceId}/steps/{stepId}/ab-test \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/sequences/{sequenceId}/steps/{stepId}/ab-test"
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/sequences/{sequenceId}/steps/{stepId}/ab-test', 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/sequences/{sequenceId}/steps/{stepId}/ab-test")
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/sequences/{sequenceId}/steps/{stepId}/ab-test",
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;
}{
"ok": true
}{
"error": "You cannot edit this step because the campaign is running",
"code": "SEQUENCE_AB_CAMPAIGN_RUNNING"
}The authentication you supplied is incorrectroute is available starting emailPro plan{
"error": "No A/B test variant on this step",
"code": "SEQUENCE_AB_NO_VARIANT"
}{
"error": "Bad method"
}Sequences
Delete A/B Test Variant
Deletes a variant of the A/B test and ends the test.
DELETE
/
sequences
/
{sequenceId}
/
steps
/
{stepId}
/
ab-test
Delete A/B Test Variant
curl --request DELETE \
--url https://api.lemlist.com/api/sequences/{sequenceId}/steps/{stepId}/ab-test \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/sequences/{sequenceId}/steps/{stepId}/ab-test"
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/sequences/{sequenceId}/steps/{stepId}/ab-test', 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/sequences/{sequenceId}/steps/{stepId}/ab-test")
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/sequences/{sequenceId}/steps/{stepId}/ab-test",
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;
}{
"ok": true
}{
"error": "You cannot edit this step because the campaign is running",
"code": "SEQUENCE_AB_CAMPAIGN_RUNNING"
}The authentication you supplied is incorrectroute is available starting emailPro plan{
"error": "No A/B test variant on this step",
"code": "SEQUENCE_AB_NO_VARIANT"
}{
"error": "Bad method"
}A/B testing requires at least the Email Pro plan.
- Deleting
B(default) drops variant B; variant A remains the step’s template. - Deleting
Apromotes variant B to A — variant B’s template becomes the step’s template.
variant query parameter (A or B,
default B):
DELETE /api/sequences/{sequenceId}/steps/{stepId}/ab-test?variant=A
404. As with other
step edits, the variant cannot be deleted while the campaign is running on a
non-editable sequence.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 sequence
The unique identifier of the step
Query Parameters
Which variant to delete. Defaults to B.
Available options:
A, B Response
Variant deleted
Was this page helpful?