Get Campaign Statutes
curl --request GET \
--url https://api.lemlist.com/api/campaigns/{campaignId}/statutes \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/campaigns/{campaignId}/statutes"
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}/statutes', 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}/statutes")
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}/statutes",
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;
}{
"name": "Product Launch Campaign",
"status": "draft",
"statutes": [
{
"type": "issue",
"level": 3,
"message": "No senders configured on this campaign."
},
{
"type": "information",
"level": 2,
"category": "limit",
"message": "John Doe daily email sending limit has been exceeded. You can increase the limit in settings or wait 2 hours"
}
]
}"Bad team"Campaigns
Get Campaign Statutes
Retrieves validation statutes for a campaign, including errors that block launching and warnings about daily limits, DNS issues, etc.
GET
/
campaigns
/
{campaignId}
/
statutes
Get Campaign Statutes
curl --request GET \
--url https://api.lemlist.com/api/campaigns/{campaignId}/statutes \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/campaigns/{campaignId}/statutes"
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}/statutes', 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}/statutes")
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}/statutes",
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;
}{
"name": "Product Launch Campaign",
"status": "draft",
"statutes": [
{
"type": "issue",
"level": 3,
"message": "No senders configured on this campaign."
},
{
"type": "information",
"level": 2,
"category": "limit",
"message": "John Doe daily email sending limit has been exceeded. You can increase the limit in settings or wait 2 hours"
}
]
}"Bad team"Statutes use the same validation engine as the lemlist UI. Each statute has a severity level:
| Level | Meaning | Example |
|---|---|---|
| 3 | Error — blocks campaign launch | Invalid sender, missing mailbox, broken DNS |
| 2 | Warning — actionable but not blocking | Daily limit exceeded, schedule missing |
| 1 | Info — purely informational | Sending rate summary |
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
Was this page helpful?