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}}",
"preheader": "Spring is here - Don't miss our latest updates!",
"sender": "sender_xY4nBk89vL2PqR0mT7hEwJ",
"scheduleType": 1,
"scheduleCondition": "2025-03-15",
"scheduleTime": "2025-03-15T14:00:00Z",
"scheduleTimezone": "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",
"scheduleTime": "2025-08-05T09:00:00Z",
"scheduleTimezone": "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}}",
"preheader": "Spring is here - Don't miss our latest updates!",
"sender": "sender_xY4nBk89vL2PqR0mT7hEwJ",
"scheduleType": 1,
"scheduleCondition": "2025-03-15",
"scheduleTime": "2025-03-15T14:00:00Z",
"scheduleTimezone": "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",
"scheduleTime": "2025-08-05T09:00:00Z",
"scheduleTimezone": "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
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
Internal campaign name
"Summer Sale 2024"
Email subject line
"π Summer Sale - 50% Off Everything!"
Sender id
"sender_4vK3WFhMgvOwUNyaL4QxCD"
Campaign scheduling type.
Values:
0- Schedule later1- Send Now
datetime for scheduled campaigns (required if scheduleType=1)
"2024-12-30"
Campaign timezone
"America/New_York"
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"]
Unique ID for the campaign
"campaign_6h8DnYrHt4KktCnG8PDO5Z"
Email preview text
"Limited time offer - Shop now!"
HTML email content
Plain text email content
Campaign status.
Values:
0- Draft1- Scheduled2- Sending3- Sent4- Quarantined5- Evaluating6- Evaluation Failed7- Warming Up
Whether the campaign is archived
false
URL to the campaign screenshot
"https://cdn.sendx.io/campaigns/screenshot_abc123.png"
Time-related condition for the campaign
"9:00 AM"
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"]
Was this page helpful?