Creates a new email campaign.
0 - Schedule for later1 - Send immediatelyTeam API key for authentication. Find your API key in SendX Settings → Team API Key.
Example:
X-Team-ApiKey: your_team_api_key_hereCampaign name for internal organization
255"Spring Sale Campaign"
Email subject line with personalization support.
Features:
255"🌸 Spring Sale - {{contact.firstName}}, Save 30%!"
Sender identifier.
Note: Sender must be verified before use
"sender_4vK3WFhMgvOwUNyaL4QxCD"
HTML content of the email campaign
"<html><body><h1>Spring Sale!</h1><p>Save 30% on all items</p></body></html>"
Preview text shown in email clients
255"Limited time offer - 30% off everything!"
Plain text version for better deliverability
"Spring Sale!\n\nSave 30% on all items..."
Campaign scheduling type.
Values:
0 - Schedule for specific date/time1 - Send immediately0
datetime for scheduled campaigns (required if scheduleType=0)
"2024-03-20"
Time condition for scheduled campaigns in HH:MM PM/AM format
"9:00 AM"
Timezone for scheduled campaigns (IANA format)
"America/New_York"
Preferred timezone for smart send optimization (required for smartSend and sendInContactsTimezone)
"America/Los_Angeles"
Preferred time optimization setting (required for smartSend and sendInContactsTimezone)
"10:00 AM"
Send at specified time in each contact's timezone
true
Enable AI-powered send time optimization
true
Segment IDs to include
["segment_v3nooFn4M423mFomfml4P"]List IDs to include
["list_vUCjsUmrVXtSppS8rD0Ssq"]Tag IDs to include
["tag_6GN4DNyrHNt4KktCNG8PDO"]Segment IDs to exclude
["segment_v3nooFn4M423mFomfml4P"]List IDs to exclude
["list_0tOFLp5RgV7s3LNiHrjGYs"]Tag IDs to exclude (prefix automatically stripped)
["tag_Bv4Wq9Xp6Zn5Ly0Kt8JhQe"]✅ Campaign created 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 Nowdatetime for scheduled campaigns (required if scheduleType=1)
"2024-12-30"
Campaign timezone
"America/New_York"
Included list IDs with prefix
[
"list_vUCjsUmrVXtSppS8rD0Ssq",
"list_0tOFLp5RgV7s3LNiHrjGYs"
]Excluded list IDs with prefix
["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 UpWhether 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_engaged_30_days"]Included tag IDs with prefix
[
"tag_6GN4DNyrHNt4KktCNG8PDO",
"tag_UhsDkjL772Qbj5lWtT62VK"
]Excluded segment IDs
[]Excluded tag IDs with prefix
["tag_Bv4Wq9Xp6Zn5Ly0Kt8JhQe"]