API Reference
Getting Started
Contact
Campaign
Reports
Event
Webhook
Campaign
Create Campaign
Create a new email campaign
POST
/
campaign
Create Campaign
Copy
Ask AI
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"
]
}'
Copy
Ask AI
{
"id": "sendx123",
"name": "My New Resource",
"success": true
}
Authorizations
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
.
Was this page helpful?
Create Campaign
Copy
Ask AI
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"
]
}'
Copy
Ask AI
{
"id": "sendx123",
"name": "My New Resource",
"success": true
}
Assistant
Responses are generated using AI and may contain mistakes.