Skip to main content
GET
/
campaign
Get all campaigns
curl --request GET \
  --url https://api.sendx.io/api/v1/rest/campaign \
  --header 'X-Team-ApiKey: <api-key>'
[
  {
    "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
  }
]
🎯 Key Features:
  • Filter by campaign type
  • Pagination support
  • Sort by date or performance
  • Include campaign statistics
📈 Status Values:
  • 0 - Draft
  • 1 - Scheduled
  • 2 - Sending
  • 3 - Sent
  • 4 - Quarantined
  • 5 - Evaluating
  • 6 - EvaluationFailed
  • 7 - WarmingUp

Authorizations

X-Team-ApiKey
string
header
required

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

offset
integer
default:0

Number of campaigns to skip

Required range: x >= 0
limit
integer
default:10

Maximum number of campaigns to return

Required range: 1 <= x <= 100
campaignType
enum<string>
default:all

Filter by campaign type

Available options:
all,
draft,
scheduled,
sent

Response

✅ Campaigns retrieved successfully

name
string
required

Internal campaign name

Example:

"Summer Sale 2024"

subject
string
required

Email subject line

Example:

"🌞 Summer Sale - 50% Off Everything!"

sender
string
required

Sender id

Example:

"sender_4vK3WFhMgvOwUNyaL4QxCD"

scheduleType
integer
default:0
required

Campaign scheduling type.

Values:

  • 0 - Schedule later
  • 1 - Send Now
scheduleCondition
string
required

datetime for scheduled campaigns (required if scheduleType=1)

Example:

"2024-12-30"

timezone
string
required

Campaign timezone

Example:

"America/New_York"

includedLists
string[]
required

Included list IDs with prefix

Example:
[
"list_vUCjsUmrVXtSppS8rD0Ssq",
"list_0tOFLp5RgV7s3LNiHrjGYs"
]
excludedLists
string[]
required

Excluded list IDs with prefix

Example:
["list_Mn7Op8Qr9St0Uv1Wx2Yz3A"]
id
string

Unique ID for the campaign

Example:

"campaign_6h8DnYrHt4KktCnG8PDO5Z"

preheader
string

Email preview text

Example:

"Limited time offer - Shop now!"

htmlContent
string

HTML email content

textContent
string

Plain text email content

status
integer

Campaign status.

Values:

  • 0 - Draft
  • 1 - Scheduled
  • 2 - Sending
  • 3 - Sent
  • 4 - Quarantined
  • 5 - Evaluating
  • 6 - Evaluation Failed
  • 7 - Warming Up
isArchived
boolean

Whether the campaign is archived

Example:

false

campaignScreenshotUrl
string

URL to the campaign screenshot

Example:

"https://cdn.sendx.io/campaigns/screenshot_abc123.png"

timeCondition
string

Time-related condition for the campaign

Example:

"9:00 AM"

smartSend
boolean

Timezone for the scheduled send

Example:

"America/New_York"

sendInContactsTimezone
boolean

Send at specified time in each contact's timezone

Example:

true

preferredTimeCondition
string

Preferred time condition, in case of smartSend and sendInContactTimeZone

Example:

"10:00 AM"

preferredTimezone
string

Preferred timezone for smart send optimization

Example:

"America/Los_Angeles"

strategy
string

Campaign delivery strategy

Example:

"Batch Sending"

includedSegments
string[]

Included segment IDs

Example:
["segment_engaged_30_days"]
includedTags
string[]

Included tag IDs with prefix

Example:
[
"tag_6GN4DNyrHNt4KktCNG8PDO",
"tag_UhsDkjL772Qbj5lWtT62VK"
]
excludedSegments
string[]

Excluded segment IDs

Example:
[]
excludedTags
string[]

Excluded tag IDs with prefix

Example:
["tag_Bv4Wq9Xp6Zn5Ly0Kt8JhQe"]
created
string<date-time>
updated
string<date-time>
I