curl --request GET \
--url https://api.sendx.io/api/v1/rest/campaign/{identifier} \
--header 'X-Team-ApiKey: <api-key>'import requests
url = "https://api.sendx.io/api/v1/rest/campaign/{identifier}"
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/{identifier}', 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/{identifier}",
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/{identifier}"
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/{identifier}")
.header("X-Team-ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendx.io/api/v1/rest/campaign/{identifier}")
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_LUE9BTxmksSmqHWbh96zsn",
"name": "Spring Sale Campaign",
"status": 1,
"scheduleType": 0,
"scheduleCondition": "2024-03-20",
"timeCondition": "10:00 PM",
"timezone": "America/New_York",
"preferredTimeCondition": "10:00 PM",
"preferredTimezone": "America/New_York",
"strategy": "Batch Sending",
"sendInContactsTimezone": true,
"smartSend": true,
"isArchived": false,
"sender": "sender_lN1aAQOmYEUp4LtH5szP3l",
"campaignScreenshotUrl": "https://cdn.sendx.io/campaigns/spring_sale_preview.png",
"includedLists": [
"list_0tOFLp5RgV7s3LNiHrjGYs",
"list_A1b2C3d4E5f6G7h8I9j0Kl"
],
"includedTags": [
"tag_6GN4DNyrHNt4KktCNG8PDO"
],
"excludedTags": [
"tag_Bv4Wq9Xp6Zn5Ly0Kt8JhQe"
],
"subject": "🌸 Spring Sale - Save up to 40%!",
"previewText": "Our biggest spring sale ends Sunday",
"htmlCode": "<html><body><h1>Spring Sale</h1><p>Save up to 40% on everything.</p></body></html>",
"plainText": "***********\nSpring Sale\n***********\n\nSave up to 40% on everything."
}Get campaign by ID
Retrieves detailed information about a specific campaign.
curl --request GET \
--url https://api.sendx.io/api/v1/rest/campaign/{identifier} \
--header 'X-Team-ApiKey: <api-key>'import requests
url = "https://api.sendx.io/api/v1/rest/campaign/{identifier}"
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/{identifier}', 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/{identifier}",
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/{identifier}"
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/{identifier}")
.header("X-Team-ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendx.io/api/v1/rest/campaign/{identifier}")
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_LUE9BTxmksSmqHWbh96zsn",
"name": "Spring Sale Campaign",
"status": 1,
"scheduleType": 0,
"scheduleCondition": "2024-03-20",
"timeCondition": "10:00 PM",
"timezone": "America/New_York",
"preferredTimeCondition": "10:00 PM",
"preferredTimezone": "America/New_York",
"strategy": "Batch Sending",
"sendInContactsTimezone": true,
"smartSend": true,
"isArchived": false,
"sender": "sender_lN1aAQOmYEUp4LtH5szP3l",
"campaignScreenshotUrl": "https://cdn.sendx.io/campaigns/spring_sale_preview.png",
"includedLists": [
"list_0tOFLp5RgV7s3LNiHrjGYs",
"list_A1b2C3d4E5f6G7h8I9j0Kl"
],
"includedTags": [
"tag_6GN4DNyrHNt4KktCNG8PDO"
],
"excludedTags": [
"tag_Bv4Wq9Xp6Zn5Ly0Kt8JhQe"
],
"subject": "🌸 Spring Sale - Save up to 40%!",
"previewText": "Our biggest spring sale ends Sunday",
"htmlCode": "<html><body><h1>Spring Sale</h1><p>Save up to 40% on everything.</p></body></html>",
"plainText": "***********\nSpring Sale\n***********\n\nSave up to 40% on everything."
}- Complete campaign configuration
- Email content:
htmlCode,plainTextandpreviewText, under the same namesPOST /campaignaccepts - Targeting and segmentation rules
- Schedule and timezone settings
- Preview campaign before sending
- Check campaign status
- Review targeting settings
- Access campaign for editing
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
Path Parameters
Campaign identifier
campaign_IMBoxK2iB5sUdgiNOjqAMA
^(campaign_)?[a-zA-Z0-9]{22}$Response
✅ Campaign 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?