Skip to main content
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:
LevelMeaningExample
3Error — blocks campaign launchInvalid sender, missing mailbox, broken DNS
2Warning — actionable but not blockingDaily limit exceeded, schedule missing
1Info — purely informationalSending rate summary

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

campaignId
string
required

The unique identifier of the campaign

Response

Success

name
string

The campaign name

status
string

The campaign status (draft, running, paused, etc.)

statutes
object[]

List of validation statutes for the campaign