Skip to main content
POST
/
contacts
/
lists
Create Contact List
curl --request POST \
  --url https://api.lemlist.com/api/contacts/lists \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Nurturing"
}
'
import requests

url = "https://api.lemlist.com/api/contacts/lists"

payload = { "name": "Nurturing" }
headers = {
    "Authorization": "Basic <encoded-value>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
  body: JSON.stringify({name: 'Nurturing'})
};

fetch('https://api.lemlist.com/api/contacts/lists', 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/contacts/lists")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Nurturing\"\n}"

response = http.request(request)
puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.lemlist.com/api/contacts/lists",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'name' => 'Nurturing'
  ]),
  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;
}
{
  "message": "Contact list created successfully",
  "list": {
    "id": "clt_abc123def456ghi78",
    "name": "Nurturing"
  }
}
"name is required and must be a non-empty string"
"The authentication you supplied is incorrect"
Creates a new static contact list in your CRM. After creation, use POST /contacts/lists/{listId}/entities to add contacts to it.
Only static lists can be created via the API. Dynamic lists (auto-populated by filters) are managed through the lemlist UI.

Authorizations

Authorization
string
header
required

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

Body

application/json
name
string
required

Name of the contact list to create (max 200 characters).

Maximum string length: 200

Response

Contact list created successfully

message
string
list
object