POST
/
campaign
Create Campaign
curl --request POST \
  --url https://api.sendx.io/api/v1/rest/campaign \
  --header 'Content-Type: application/json' \
  --header 'X-Team-ApiKey: <api-key>' \
  --data '{
  "name": "New Year Promotion",
  "htmlCode": "<html><body><h1>Happy New Year!</h1></body></html>",
  "subject": "New Year Offer",
  "sender": "sender_123",
  "previewText": "Exclusive New Year promotions inside",
  "scheduleType": 1,
  "scheduleCondition": "2025-01-21",
  "timeCondition": "10:00 AM",
  "timezone": "America/New_York",
  "preferredTimezone": "America/New_York",
  "preferredTimeCondition": "10:00 AM",
  "sendInContactsTimezone": true,
  "smartSend": true,
  "includedSegments": [
    "segment_1",
    "segment_2"
  ],
  "includedLists": [
    "list_1",
    "list_2"
  ],
  "includedTags": [
    "tag_1",
    "tag_2"
  ],
  "excludedSegments": [
    "segment_3"
  ],
  "excludedLists": [
    "list_3"
  ],
  "excludedTags": [
    "tag_3"
  ]
}'
{
  "id": "sendx123",
  "name": "My New Resource",
  "success": true
}

Authorizations

X-Team-ApiKey
string
header
required

Body

application/json

The campaign content

The body is of type object.

Response

200
application/json

Campaign Created Successfully

The response is of type object.