curl --request POST \
--url https://api.coldsend.pro/api/public/v1/contacts/lists \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"list_type": "STATIC",
"filter_definition": {
"signal": [],
"tag_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"is_unsubscribed": true,
"is_bounced": true,
"source_type": [],
"source_name": "<string>",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"not_in_campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_touch_after": "2023-11-07T05:31:56Z",
"last_touch_before": "2023-11-07T05:31:56Z",
"has_replied": true,
"has_opened": true,
"search": "<string>"
},
"contact_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.coldsend.pro/api/public/v1/contacts/lists"
payload = {
"name": "<string>",
"description": "<string>",
"list_type": "STATIC",
"filter_definition": {
"signal": [],
"tag_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"is_unsubscribed": True,
"is_bounced": True,
"source_type": [],
"source_name": "<string>",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"not_in_campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_touch_after": "2023-11-07T05:31:56Z",
"last_touch_before": "2023-11-07T05:31:56Z",
"has_replied": True,
"has_opened": True,
"search": "<string>"
},
"contact_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
list_type: 'STATIC',
filter_definition: {
signal: [],
tag_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
is_unsubscribed: true,
is_bounced: true,
source_type: [],
source_name: '<string>',
campaign_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
not_in_campaign_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
last_touch_after: '2023-11-07T05:31:56Z',
last_touch_before: '2023-11-07T05:31:56Z',
has_replied: true,
has_opened: true,
search: '<string>'
},
contact_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api.coldsend.pro/api/public/v1/contacts/lists', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coldsend.pro/api/public/v1/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' => '<string>',
'description' => '<string>',
'list_type' => 'STATIC',
'filter_definition' => [
'signal' => [
],
'tag_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'is_unsubscribed' => true,
'is_bounced' => true,
'source_type' => [
],
'source_name' => '<string>',
'campaign_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'not_in_campaign_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'last_touch_after' => '2023-11-07T05:31:56Z',
'last_touch_before' => '2023-11-07T05:31:56Z',
'has_replied' => true,
'has_opened' => true,
'search' => '<string>'
],
'contact_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coldsend.pro/api/public/v1/contacts/lists"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"list_type\": \"STATIC\",\n \"filter_definition\": {\n \"signal\": [],\n \"tag_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"is_unsubscribed\": true,\n \"is_bounced\": true,\n \"source_type\": [],\n \"source_name\": \"<string>\",\n \"campaign_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"not_in_campaign_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"last_touch_after\": \"2023-11-07T05:31:56Z\",\n \"last_touch_before\": \"2023-11-07T05:31:56Z\",\n \"has_replied\": true,\n \"has_opened\": true,\n \"search\": \"<string>\"\n },\n \"contact_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.coldsend.pro/api/public/v1/contacts/lists")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"list_type\": \"STATIC\",\n \"filter_definition\": {\n \"signal\": [],\n \"tag_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"is_unsubscribed\": true,\n \"is_bounced\": true,\n \"source_type\": [],\n \"source_name\": \"<string>\",\n \"campaign_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"not_in_campaign_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"last_touch_after\": \"2023-11-07T05:31:56Z\",\n \"last_touch_before\": \"2023-11-07T05:31:56Z\",\n \"has_replied\": true,\n \"has_opened\": true,\n \"search\": \"<string>\"\n },\n \"contact_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coldsend.pro/api/public/v1/contacts/lists")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"list_type\": \"STATIC\",\n \"filter_definition\": {\n \"signal\": [],\n \"tag_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"is_unsubscribed\": true,\n \"is_bounced\": true,\n \"source_type\": [],\n \"source_name\": \"<string>\",\n \"campaign_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"not_in_campaign_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"last_touch_after\": \"2023-11-07T05:31:56Z\",\n \"last_touch_before\": \"2023-11-07T05:31:56Z\",\n \"has_replied\": true,\n \"has_opened\": true,\n \"search\": \"<string>\"\n },\n \"contact_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"contact_list": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"list_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"filter_definition": {},
"created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cached_count": 123,
"count_refreshed_at": "2023-11-07T05:31:56Z"
},
"success": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create a saved segment
Create a contact list
STATIC lists hold explicit members (supply contact_ids, add more later via
POST /contacts/bulk/lists). DYNAMIC lists evaluate their
filter_definition — the same filter set as GET /contacts — at query
time, so contacts imported later join automatically.
curl --request POST \
--url https://api.coldsend.pro/api/public/v1/contacts/lists \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"list_type": "STATIC",
"filter_definition": {
"signal": [],
"tag_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"is_unsubscribed": true,
"is_bounced": true,
"source_type": [],
"source_name": "<string>",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"not_in_campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_touch_after": "2023-11-07T05:31:56Z",
"last_touch_before": "2023-11-07T05:31:56Z",
"has_replied": true,
"has_opened": true,
"search": "<string>"
},
"contact_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.coldsend.pro/api/public/v1/contacts/lists"
payload = {
"name": "<string>",
"description": "<string>",
"list_type": "STATIC",
"filter_definition": {
"signal": [],
"tag_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"is_unsubscribed": True,
"is_bounced": True,
"source_type": [],
"source_name": "<string>",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"not_in_campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_touch_after": "2023-11-07T05:31:56Z",
"last_touch_before": "2023-11-07T05:31:56Z",
"has_replied": True,
"has_opened": True,
"search": "<string>"
},
"contact_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
list_type: 'STATIC',
filter_definition: {
signal: [],
tag_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
is_unsubscribed: true,
is_bounced: true,
source_type: [],
source_name: '<string>',
campaign_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
not_in_campaign_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
last_touch_after: '2023-11-07T05:31:56Z',
last_touch_before: '2023-11-07T05:31:56Z',
has_replied: true,
has_opened: true,
search: '<string>'
},
contact_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api.coldsend.pro/api/public/v1/contacts/lists', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coldsend.pro/api/public/v1/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' => '<string>',
'description' => '<string>',
'list_type' => 'STATIC',
'filter_definition' => [
'signal' => [
],
'tag_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'is_unsubscribed' => true,
'is_bounced' => true,
'source_type' => [
],
'source_name' => '<string>',
'campaign_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'not_in_campaign_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'last_touch_after' => '2023-11-07T05:31:56Z',
'last_touch_before' => '2023-11-07T05:31:56Z',
'has_replied' => true,
'has_opened' => true,
'search' => '<string>'
],
'contact_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coldsend.pro/api/public/v1/contacts/lists"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"list_type\": \"STATIC\",\n \"filter_definition\": {\n \"signal\": [],\n \"tag_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"is_unsubscribed\": true,\n \"is_bounced\": true,\n \"source_type\": [],\n \"source_name\": \"<string>\",\n \"campaign_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"not_in_campaign_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"last_touch_after\": \"2023-11-07T05:31:56Z\",\n \"last_touch_before\": \"2023-11-07T05:31:56Z\",\n \"has_replied\": true,\n \"has_opened\": true,\n \"search\": \"<string>\"\n },\n \"contact_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.coldsend.pro/api/public/v1/contacts/lists")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"list_type\": \"STATIC\",\n \"filter_definition\": {\n \"signal\": [],\n \"tag_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"is_unsubscribed\": true,\n \"is_bounced\": true,\n \"source_type\": [],\n \"source_name\": \"<string>\",\n \"campaign_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"not_in_campaign_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"last_touch_after\": \"2023-11-07T05:31:56Z\",\n \"last_touch_before\": \"2023-11-07T05:31:56Z\",\n \"has_replied\": true,\n \"has_opened\": true,\n \"search\": \"<string>\"\n },\n \"contact_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coldsend.pro/api/public/v1/contacts/lists")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"list_type\": \"STATIC\",\n \"filter_definition\": {\n \"signal\": [],\n \"tag_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"is_unsubscribed\": true,\n \"is_bounced\": true,\n \"source_type\": [],\n \"source_name\": \"<string>\",\n \"campaign_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"not_in_campaign_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"last_touch_after\": \"2023-11-07T05:31:56Z\",\n \"last_touch_before\": \"2023-11-07T05:31:56Z\",\n \"has_replied\": true,\n \"has_opened\": true,\n \"search\": \"<string>\"\n },\n \"contact_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"contact_list": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"list_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"filter_definition": {},
"created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cached_count": 123,
"count_refreshed_at": "2023-11-07T05:31:56Z"
},
"success": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
API key with format cs_live_xxx
Body
Create a saved segment.
The DB enforces that DYNAMIC carries a filter and STATIC does not
(check_contact_lists_filter_matches_type); this mirrors it so the
caller gets a 422 naming the field rather than a 500 from Postgres.
1 - 255500Whether a contact list computes its members or stores them.
DYNAMIC lists evaluate contact_lists.filter_definition at query time
and therefore pick up newly created contacts automatically. STATIC
lists materialise membership rows in contact_list_members.
DYNAMIC, STATIC The v1 directory filter set.
Deliberately a fixed, indexed set rather than a general boolean query
builder: every field below resolves to an index on contacts or to an
EXISTS over an indexed child, so a filter combination cannot degrade into
a sequential scan of a team's directory.
Multiple fields AND together. Within a list-valued field the values OR
together (signal=["HOT_LEAD","ENGAGED"] means either).
extra="forbid" is load-bearing. This model parses filter_definition
JSONB written by earlier versions of the UI, and a silently-ignored
unknown key would widen a saved segment instead of failing it -- which,
for a list that feeds a campaign, means emailing people the segment was
written to exclude.
Note there is no list_id field. Resolving a list is the service's job,
precisely so a DYNAMIC list's filter cannot reference another list (or
itself) and recurse.
Show child attributes
Show child attributes
Initial members; STATIC lists only
1000Was this page helpful?

