curl --request GET \
--url https://api.sendx.io/api/v1/rest/campaign \
--header 'X-Team-ApiKey: <api-key>'import requests
url = "https://api.sendx.io/api/v1/rest/campaign"
headers = {"X-Team-ApiKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Team-ApiKey': '<api-key>'}};
fetch('https://api.sendx.io/api/v1/rest/campaign', 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.sendx.io/api/v1/rest/campaign",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Team-ApiKey: <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"
"net/http"
"io"
)
func main() {
url := "https://api.sendx.io/api/v1/rest/campaign"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Team-ApiKey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sendx.io/api/v1/rest/campaign")
.header("X-Team-ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendx.io/api/v1/rest/campaign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Team-ApiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "campaign_IMBoxK2iB5sUdgiNOjqAMA",
"name": "March Newsletter",
"status": 3,
"subject": "March Updates from {{company.name}}",
"sender": "sender_xY4nBk89vL2PqR0mT7hEwJ",
"scheduleType": 1,
"scheduleCondition": "2025-03-15",
"timeCondition": "10:00 AM",
"timezone": "America/New_York",
"includedLists": [
"list_A1b2C3d4E5f6G7h8I9j0Kl",
"list_Mn7Op8Qr9St0Uv1Wx2Yz3A"
],
"excludedTags": [
"tag_Bv4Wq9Xp6Zn5Ly0Kt8JhQe"
],
"smartSend": true,
"sendInContactsTimezone": false,
"preferredTimeCondition": "09:00 AM",
"preferredTimezone": "America/New_York",
"campaignScreenshotUrl": "https://cdn.sendx.io/campaigns/march_newsletter.png"
},
{
"id": "campaign_Jexkb4tu7FoPJ4dvJDQYS5",
"name": "Welcome Series - Email 1",
"status": 1,
"subject": "Welcome to {{company.name}}!",
"sender": "sender_Po9Lq8RmTz7WvXy0Ab1CdE",
"scheduleType": 0,
"includedTags": [
"tag_Df9Gh0JkLm2Np3QrSt5UvW"
],
"isArchived": false,
"smartSend": false
},
{
"id": "campaign_6h8DnYrHt4KktCnG8PDO5Z",
"name": "Flash Sale - 24 Hours Only",
"status": 2,
"subject": "β° 24 Hour Flash Sale β Up to 70% Off!",
"sender": "sender_Jk8Lm0NpQr2StUvWx3Yz4A",
"scheduleType": 1,
"scheduleCondition": "2025-08-05",
"timeCondition": "09:00 AM",
"timezone": "Asia/Kolkata",
"includedLists": [
"list_Ty6UvWx7Yz8A9Bc0De1FgH"
],
"includedTags": [
"tag_Op9QrSt0Uv1Wx2Yz3AbCdE"
],
"excludedLists": [
"list_Xy3Zb4C5De6Fg7Hi8Jk9Lm"
],
"sendInContactsTimezone": true,
"preferredTimeCondition": "10:00 AM",
"preferredTimezone": "Asia/Kolkata",
"strategy": "Batch Sending",
"smartSend": true
},
{
"id": "campaign_Mo5Np6Qr7St8Uv9WxYz0Ab",
"name": "Customer Re-Engagement",
"status": 4,
"subject": "We miss you β Hereβs 20% off to come back",
"sender": "sender_Np3QrSt5UvWx7Yz8Ab9CdE",
"scheduleType": 2,
"includedSegments": [
"segment_Gh8Ij9Kl0Mn1Op2Qr3StUv"
],
"excludedSegments": [
"segment_Xy0Za1Bc2De3Fg4Hi5JkLm"
],
"strategy": "Time-Optimized",
"smartSend": false
}
]{
"status": 401,
"message": "The Team ID or API Key specified is not valid"
}{
"status": "error",
"message": "Internal server error occurred"
}Get all campaigns
Retrieves a paginated list of all campaigns.
curl --request GET \
--url https://api.sendx.io/api/v1/rest/campaign \
--header 'X-Team-ApiKey: <api-key>'import requests
url = "https://api.sendx.io/api/v1/rest/campaign"
headers = {"X-Team-ApiKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Team-ApiKey': '<api-key>'}};
fetch('https://api.sendx.io/api/v1/rest/campaign', 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.sendx.io/api/v1/rest/campaign",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Team-ApiKey: <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"
"net/http"
"io"
)
func main() {
url := "https://api.sendx.io/api/v1/rest/campaign"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Team-ApiKey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sendx.io/api/v1/rest/campaign")
.header("X-Team-ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendx.io/api/v1/rest/campaign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Team-ApiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "campaign_IMBoxK2iB5sUdgiNOjqAMA",
"name": "March Newsletter",
"status": 3,
"subject": "March Updates from {{company.name}}",
"sender": "sender_xY4nBk89vL2PqR0mT7hEwJ",
"scheduleType": 1,
"scheduleCondition": "2025-03-15",
"timeCondition": "10:00 AM",
"timezone": "America/New_York",
"includedLists": [
"list_A1b2C3d4E5f6G7h8I9j0Kl",
"list_Mn7Op8Qr9St0Uv1Wx2Yz3A"
],
"excludedTags": [
"tag_Bv4Wq9Xp6Zn5Ly0Kt8JhQe"
],
"smartSend": true,
"sendInContactsTimezone": false,
"preferredTimeCondition": "09:00 AM",
"preferredTimezone": "America/New_York",
"campaignScreenshotUrl": "https://cdn.sendx.io/campaigns/march_newsletter.png"
},
{
"id": "campaign_Jexkb4tu7FoPJ4dvJDQYS5",
"name": "Welcome Series - Email 1",
"status": 1,
"subject": "Welcome to {{company.name}}!",
"sender": "sender_Po9Lq8RmTz7WvXy0Ab1CdE",
"scheduleType": 0,
"includedTags": [
"tag_Df9Gh0JkLm2Np3QrSt5UvW"
],
"isArchived": false,
"smartSend": false
},
{
"id": "campaign_6h8DnYrHt4KktCnG8PDO5Z",
"name": "Flash Sale - 24 Hours Only",
"status": 2,
"subject": "β° 24 Hour Flash Sale β Up to 70% Off!",
"sender": "sender_Jk8Lm0NpQr2StUvWx3Yz4A",
"scheduleType": 1,
"scheduleCondition": "2025-08-05",
"timeCondition": "09:00 AM",
"timezone": "Asia/Kolkata",
"includedLists": [
"list_Ty6UvWx7Yz8A9Bc0De1FgH"
],
"includedTags": [
"tag_Op9QrSt0Uv1Wx2Yz3AbCdE"
],
"excludedLists": [
"list_Xy3Zb4C5De6Fg7Hi8Jk9Lm"
],
"sendInContactsTimezone": true,
"preferredTimeCondition": "10:00 AM",
"preferredTimezone": "Asia/Kolkata",
"strategy": "Batch Sending",
"smartSend": true
},
{
"id": "campaign_Mo5Np6Qr7St8Uv9WxYz0Ab",
"name": "Customer Re-Engagement",
"status": 4,
"subject": "We miss you β Hereβs 20% off to come back",
"sender": "sender_Np3QrSt5UvWx7Yz8Ab9CdE",
"scheduleType": 2,
"includedSegments": [
"segment_Gh8Ij9Kl0Mn1Op2Qr3StUv"
],
"excludedSegments": [
"segment_Xy0Za1Bc2De3Fg4Hi5JkLm"
],
"strategy": "Time-Optimized",
"smartSend": false
}
]{
"status": 401,
"message": "The Team ID or API Key specified is not valid"
}{
"status": "error",
"message": "Internal server error occurred"
}- Filter by campaign type
- Pagination support
- Sort by date or performance
- Include campaign statistics
htmlCode, plainText and previewText. Use Get campaign by ID to read a campaignβs content.
π Status Values:
0- Draft1- Scheduled2- Sending3- Sent4- Quarantined5- Evaluating6- EvaluationFailed7- WarmingUp
Authorizations
Team API key for authentication. Find your API key in SendX Settings β Team API Key.
Example:
X-Team-ApiKey: your_team_api_key_here
Query Parameters
Number of campaigns to skip
x >= 0Maximum number of campaigns to return
1 <= x <= 100Filter by campaign type
all, draft, scheduled, sent Response
β Campaigns retrieved successfully
Campaign ID, with prefix
^campaign_[a-zA-Z0-9]{22}$"campaign_4vK3WFhMgvOwUNyaL4QxCD"
Internal campaign name
"Summer Sale 2024"
Email subject line
"π Summer Sale - 50% Off Everything!"
Sender id
"sender_4vK3WFhMgvOwUNyaL4QxCD"
Campaign status.
Values:
0- Draft1- Scheduled2- Sending3- Sent4- Quarantined5- Evaluating6- Evaluation failed7- Warming up8- Warming up paused9- Spread sending paused
0, 1, 2, 3, 4, 5, 6, 7, 8, 9 1
Campaign scheduling type.
Values:
0- Schedule later1- Send Now
0, 1, 2, 3 datetime for scheduled campaigns (required if scheduleType=1)
"2024-12-30"
Included list IDs with prefix
^list_[a-zA-Z0-9]{22}$[
"list_vUCjsUmrVXtSppS8rD0Ssq",
"list_0tOFLp5RgV7s3LNiHrjGYs"
]
Excluded list IDs with prefix
^list_[a-zA-Z0-9]{22}$["list_Mn7Op8Qr9St0Uv1Wx2Yz3A"]
HTML email content. Matches the htmlCode field accepted on create/update.
Returned by GET /campaign/{id}, POST /campaign, and PUT /campaign/{id}
only. Omitted from the GET /campaign list response β campaign HTML is
large, so the list endpoint stays lean. Fetch a single campaign to read it.
"<html><body><h1>Summer Sale</h1></body></html>"
Plain text email content. Currently auto-generated from htmlCode on
create/update rather than taken from the request. Omitted from the list
response, like htmlCode.
"Summer Sale"
Email preview text (preheader). Omitted from the list response, like
htmlCode.
"Limited time offer - Shop now!"
Time-related condition for the campaign
"9:00 AM"
Campaign timezone
"America/New_York"
Timezone for the scheduled send
"America/New_York"
Send at specified time in each contact's timezone
true
Preferred time condition, in case of smartSend and sendInContactTimeZone
"10:00 AM"
Preferred timezone for smart send optimization
"America/Los_Angeles"
Campaign delivery strategy
"Batch Sending"
Included segment IDs
^segment_[a-zA-Z0-9]{22}$["segment_engaged_30_days"]
Included tag IDs with prefix
^tag_[a-zA-Z0-9]{22}$[
"tag_6GN4DNyrHNt4KktCNG8PDO",
"tag_UhsDkjL772Qbj5lWtT62VK"
]
Excluded segment IDs
^segment_[a-zA-Z0-9]{22}$[]
Excluded tag IDs with prefix
^tag_[a-zA-Z0-9]{22}$["tag_Bv4Wq9Xp6Zn5Ly0Kt8JhQe"]
Whether the campaign has been archived
false
URL of the generated campaign preview screenshot. Empty until the screenshot job completes.
Whether autowarmup is enabled for this campaign
false
Autowarmup pacing type
0
Autowarmup starting level
0
Whether plain warmup is enabled for this campaign
false
Plain warmup starting level
0
Was this page helpful?