Create a campaign

Use this endpoint to create a campaign and specify its attributes.

Path Params
string
enum
required

Specify how the campaign is triggered. Choose an option from the list.

Allowed:
Body Params

Specifications for the campaign to be created.

string
required

The name of the campaign.

string

Email address of the campaign author.

boolean
Defaults to true

Determines if the campaign should be launched immediately (true) or saved as a draft (false).

Default: true.

date-time
required

Campaign start time in ISO 8601 format.

Default: current time.

date-time

Campaign end time in ISO 8601 format.

Default: Runs indefinitely.

Applicable only for event-triggered campaigns.

string

UUID of the segment associated with this campaign.

Required only for one-time campaigns.

string

The event that triggers this campaign. Must match an Event Attribute in the Events dashboard.

If left blank, the campaign is API triggered and can only be triggered via the Campaign Execute API.

Applicable only for event-triggered campaigns.

boolean
Defaults to false

Whether to bypass messaging limits.

Default: false.

boolean
Defaults to false

Whether to send messages to users outside the global inclusion segment.

Default: false.

boolean
Defaults to false

Controls whether sent messages are excluded from the user’s message counts.

When set to true, messages do not count towards the user’s message limits.

Default: false.

boolean
Defaults to false

Whether to exclude unsubscribe headers from emails.

Default: false.

string

Email address to receive the campaign execution summary.

Applicable only for one-time campaigns.

boolean
Defaults to false

Whether to send messages to unsubscribed users.

Default: false.

string
enum
Defaults to multiple

Defines how often a user can enter the journey.

Options: once_per_lifetime, once_at_any_time, multiple.

Default: multiple.

Allowed:
seed_list_uuids
array of strings

An array of seed list UUIDs for testing campaigns.

seed_list_uuids
string

Tags associated with the campaign.

Format: folder_name: tag1, tag2, tag3.

Example: Regions:USA,Canada|Products:Electronics,Apparel.

triggers
array of objects

You can add only one trigger at a time. If you add multiple triggers, the endpoint returns an error.

triggers
Responses

400

Bad Request - The request is invalid due to missing or incorrect parameters. This includes missing fields, invalid values, formatting issues, or conflicts such as duplicate data.

401

Unauthorized - API authentication failed due to an invalid or missing API key.

403

Forbidden - The API key does not have sufficient permissions to perform this action.

404

Not Found - The specified campaign was not found. Verify the campaign UUID.

422

Unprocessable Entity - The campaign cannot be paused due to its current status (e.g., already completed or archived). One or more scheduling parameters may be invalid (if applicable).

429

Too Many Requests - The request limit has been exceeded. Reduce request frequency.

500

Internal Server Error - An unexpected server error occurred. Contact support if the issue persists.

502

Bad Gateway - The server received an invalid response. Retry the request.

503

Service Unavailable - The service is temporarily unavailable. Try again later.

504

Gateway Timeout - The server took too long to respond. Retry the request with exponential backoff.

Language
Credentials
Basic
base64
:
URL
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json