Get Campaign Senders
curl --request GET \
--url https://api.lemlist.com/api/campaigns/{campaignId}/senders \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/campaigns/{campaignId}/senders"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/campaigns/{campaignId}/senders', 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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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": [
{
"scope": "user",
"type": "warning",
"code": "license_missing"
}
]
}
],
"diagnostics": []
}
}{
"error": "Wrong param campaign id",
"code": "WRONG_PARAM_CAMPAIGN_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"
}Senders
Get Campaign Senders
Returns the sender pool of a campaign, as the campaign editor shows it.
GET
/
campaigns
/
{campaignId}
/
senders
Get Campaign Senders
curl --request GET \
--url https://api.lemlist.com/api/campaigns/{campaignId}/senders \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/campaigns/{campaignId}/senders"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/campaigns/{campaignId}/senders', 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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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": [
{
"scope": "user",
"type": "warning",
"code": "license_missing"
}
]
}
],
"diagnostics": []
}
}{
"error": "Wrong param campaign id",
"code": "WRONG_PARAM_CAMPAIGN_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"
}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.
readOnly: truemeans that the campaign uses a dynamic sender strategy (contactOwner,leadImporterorcustomField:<field>): the leads select the senders, and the write endpoints answer409.- A sender forced on a step shows in the pool with its forced channel, even when the sender is not in the pool.
senders[].channels[]withoutlabel,espanddiagnosticsis a validchannelslist for the write endpoints.
Diagnostics
Each sender, each channel and the pool carrydiagnostics. An error blocks
the sending. A warning or an info does not.
code | scope | type | Meaning |
|---|---|---|---|
channel_missing | channel | error | A step needs a channel type that the sender does not have. |
channel_disconnected | channel | error | The account is disconnected. |
channel_linked_elsewhere | channel | error | The LinkedIn profile is active on another lemlist account. |
channel_issue | channel | error | The mailbox has an error. message gives the error. |
channel_not_required | channel | info | No step uses this channel type. The channel sends nothing. |
no_required_channel_active | user | error | The sender has no enabled channel of a channel type that a step uses. |
license_missing | user | warning | The user has no active seat. |
sender_paused | user | info | The user paused their sending for a date range. The sending starts again after. |
no_account_connected | global | info | Nobody in the team has an account of a channel type that a step uses. |
no_sender_enabled | global | error | The pool is empty, and a step needs a 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
Response
Success
The sender pool of a campaign, as the campaign editor shows it.
Show child attributes
Show child attributes
Was this page helpful?