Replace Team Sender Exclusions
curl --request PUT \
--url https://api.lemlist.com/api/team/dynamic-sender-exclusions \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"senders": [
{
"userId": "usr_T2wWj3GOt0hXms721",
"channels": [
{
"type": "email",
"id": "usm_oZOkr8H1oFjgvDI6J"
},
{
"type": "linkedin"
}
]
},
{
"userId": "usr_ll2LqAVvLk75ER9fv"
}
]
}
'import requests
url = "https://api.lemlist.com/api/team/dynamic-sender-exclusions"
payload = { "senders": [{
"userId": "usr_T2wWj3GOt0hXms721",
"channels": [{
"type": "email",
"id": "usm_oZOkr8H1oFjgvDI6J"
}, { "type": "linkedin" }]
}, { "userId": "usr_ll2LqAVvLk75ER9fv" }] }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
senders: [
{
userId: 'usr_T2wWj3GOt0hXms721',
channels: [{type: 'email', id: 'usm_oZOkr8H1oFjgvDI6J'}, {type: 'linkedin'}]
},
{userId: 'usr_ll2LqAVvLk75ER9fv'}
]
})
};
fetch('https://api.lemlist.com/api/team/dynamic-sender-exclusions', 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/team/dynamic-sender-exclusions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"senders\": [\n {\n \"userId\": \"usr_T2wWj3GOt0hXms721\",\n \"channels\": [\n {\n \"type\": \"email\",\n \"id\": \"usm_oZOkr8H1oFjgvDI6J\"\n },\n {\n \"type\": \"linkedin\"\n }\n ]\n },\n {\n \"userId\": \"usr_ll2LqAVvLk75ER9fv\"\n }\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/team/dynamic-sender-exclusions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'senders' => [
[
'userId' => 'usr_T2wWj3GOt0hXms721',
'channels' => [
[
'type' => 'email',
'id' => 'usm_oZOkr8H1oFjgvDI6J'
],
[
'type' => 'linkedin'
]
]
],
[
'userId' => 'usr_ll2LqAVvLk75ER9fv'
]
]
]),
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;
}{
"data": {
"senders": [
{
"userId": "usr_T2wWj3GOt0hXms721",
"channels": [
{
"type": "email",
"id": "usm_oZOkr8H1oFjgvDI6J"
},
{
"type": "linkedin"
}
]
},
{
"userId": "usr_ll2LqAVvLk75ER9fv"
}
]
}
}{
"error": "A channel does not belong to the sender. Take the channel id from the team senders list: the mailbox id, the WhatsApp account id or the phone number",
"code": "CAMPAIGN_DYNAMIC_SENDER_UNKNOWN_CHANNEL"
}The authentication you supplied is incorrectroute is available starting emailPro plan{
"error": "You are not allowed to edit the team sending settings. Ask a team admin",
"code": "CAMPAIGN_DYNAMIC_SENDER_NOT_ALLOWED"
}{
"error": "Route bad method",
"code": "ROUTE_BAD_METHOD"
}Senders
Replace Team Sender Exclusions
Replaces the senders that the dynamic sender strategies of the team cannot select.
PUT
/
team
/
dynamic-sender-exclusions
Replace Team Sender Exclusions
curl --request PUT \
--url https://api.lemlist.com/api/team/dynamic-sender-exclusions \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"senders": [
{
"userId": "usr_T2wWj3GOt0hXms721",
"channels": [
{
"type": "email",
"id": "usm_oZOkr8H1oFjgvDI6J"
},
{
"type": "linkedin"
}
]
},
{
"userId": "usr_ll2LqAVvLk75ER9fv"
}
]
}
'import requests
url = "https://api.lemlist.com/api/team/dynamic-sender-exclusions"
payload = { "senders": [{
"userId": "usr_T2wWj3GOt0hXms721",
"channels": [{
"type": "email",
"id": "usm_oZOkr8H1oFjgvDI6J"
}, { "type": "linkedin" }]
}, { "userId": "usr_ll2LqAVvLk75ER9fv" }] }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
senders: [
{
userId: 'usr_T2wWj3GOt0hXms721',
channels: [{type: 'email', id: 'usm_oZOkr8H1oFjgvDI6J'}, {type: 'linkedin'}]
},
{userId: 'usr_ll2LqAVvLk75ER9fv'}
]
})
};
fetch('https://api.lemlist.com/api/team/dynamic-sender-exclusions', 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/team/dynamic-sender-exclusions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"senders\": [\n {\n \"userId\": \"usr_T2wWj3GOt0hXms721\",\n \"channels\": [\n {\n \"type\": \"email\",\n \"id\": \"usm_oZOkr8H1oFjgvDI6J\"\n },\n {\n \"type\": \"linkedin\"\n }\n ]\n },\n {\n \"userId\": \"usr_ll2LqAVvLk75ER9fv\"\n }\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/team/dynamic-sender-exclusions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'senders' => [
[
'userId' => 'usr_T2wWj3GOt0hXms721',
'channels' => [
[
'type' => 'email',
'id' => 'usm_oZOkr8H1oFjgvDI6J'
],
[
'type' => 'linkedin'
]
]
],
[
'userId' => 'usr_ll2LqAVvLk75ER9fv'
]
]
]),
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;
}{
"data": {
"senders": [
{
"userId": "usr_T2wWj3GOt0hXms721",
"channels": [
{
"type": "email",
"id": "usm_oZOkr8H1oFjgvDI6J"
},
{
"type": "linkedin"
}
]
},
{
"userId": "usr_ll2LqAVvLk75ER9fv"
}
]
}
}{
"error": "A channel does not belong to the sender. Take the channel id from the team senders list: the mailbox id, the WhatsApp account id or the phone number",
"code": "CAMPAIGN_DYNAMIC_SENDER_UNKNOWN_CHANNEL"
}The authentication you supplied is incorrectroute is available starting emailPro plan{
"error": "You are not allowed to edit the team sending settings. Ask a team admin",
"code": "CAMPAIGN_DYNAMIC_SENDER_NOT_ALLOWED"
}{
"error": "Route bad method",
"code": "ROUTE_BAD_METHOD"
}This endpoint requires at least the Email Pro plan. The user of the API
key must be allowed to edit the team sending settings. Else the request answers
403.The team list applies to each dynamic campaign without a list of its own. A
change here changes all these campaigns. An empty list (
{ "senders": [] })
excludes nobody.Validation
- Each
userIdis a team member, and appears once. - Each channel
idis an account of its user: the mailbox ID, the WhatsApp account ID or the phone number, as List Senders returns them. A phone shared by several users is a channel of each of them. linkedinandothertake noid.- A refused request writes nothing.
Authorizations
Body
application/json
Was this page helpful?