Remove Campaign Sender
curl --request DELETE \
--url https://api.lemlist.com/api/campaigns/{campaignId}/senders/{userId} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/campaigns/{campaignId}/senders/{userId}"
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}/senders/{userId}', 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}/senders/{userId}")
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}/senders/{userId}",
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;
}{
"data": {
"campaignId": "cam_A1b2C3d4E5f6G7h8M",
"senderStrategy": "random",
"espMatching": false,
"readOnly": false,
"senders": [
{
"userId": "usr_A1b2C3d4E5f6G7h8K",
"name": "John Doe",
"email": "john@example.com",
"channels": [
{
"type": "email",
"id": "usm_A1b2C3d4E5f6G7h8L",
"label": "john@example.com",
"alias": "john@example.com",
"esp": "google",
"diagnostics": []
}
],
"diagnostics": []
}
],
"diagnostics": []
},
"impact": {
"contactedLeads": 0
}
}{
"error": "Wrong param user id",
"code": "WRONG_PARAM_USER_ID"
}The authentication you supplied is incorrectroute is available starting emailPro plan{
"error": "Campaign not found",
"code": "SENDER_CAMPAIGN_NOT_FOUND"
}{
"error": "Route bad method",
"code": "ROUTE_BAD_METHOD"
}{
"error": "The campaign uses a dynamic sender strategy: the leads select the senders",
"code": "SENDER_CAMPAIGN_DYNAMIC_STRATEGY"
}Senders
Remove Campaign Sender
Removes one sender from the sender pool of a campaign.
DELETE
/
campaigns
/
{campaignId}
/
senders
/
{userId}
Remove Campaign Sender
curl --request DELETE \
--url https://api.lemlist.com/api/campaigns/{campaignId}/senders/{userId} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/campaigns/{campaignId}/senders/{userId}"
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}/senders/{userId}', 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}/senders/{userId}")
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}/senders/{userId}",
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;
}{
"data": {
"campaignId": "cam_A1b2C3d4E5f6G7h8M",
"senderStrategy": "random",
"espMatching": false,
"readOnly": false,
"senders": [
{
"userId": "usr_A1b2C3d4E5f6G7h8K",
"name": "John Doe",
"email": "john@example.com",
"channels": [
{
"type": "email",
"id": "usm_A1b2C3d4E5f6G7h8L",
"label": "john@example.com",
"alias": "john@example.com",
"esp": "google",
"diagnostics": []
}
],
"diagnostics": []
}
],
"diagnostics": []
},
"impact": {
"contactedLeads": 0
}
}{
"error": "Wrong param user id",
"code": "WRONG_PARAM_USER_ID"
}The authentication you supplied is incorrectroute is available starting emailPro plan{
"error": "Campaign not found",
"code": "SENDER_CAMPAIGN_NOT_FOUND"
}{
"error": "Route bad method",
"code": "ROUTE_BAD_METHOD"
}{
"error": "The campaign uses a dynamic sender strategy: the leads select the senders",
"code": "SENDER_CAMPAIGN_DYNAMIC_STRATEGY"
}The sender pool requires at least the Email Pro plan.
To pin the sender of one step, outside the pool, see
Set Step Sender in the
Sequences group.
- The leads not contacted yet get another sender of the pool at their next step.
- The contacted leads keep the removed sender. Their next steps stop with a
“Send user is missing” error, until the sender comes back in the pool.
impact.contactedLeadsgives the number of these leads. - A step with this user as forced sender keeps it. To change it, see Set Step Sender.
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 team member to change
Was this page helpful?