Create a campaign

Creates a new outbound messaging campaign. At least one of 'selection' or 'contacts' must be provided to define the campaign recipients. Messages are sent every day inside the daily window defined in 'config' ('dailyStartAt' to 'dailyEndAt'), spreading up to 'maxContactsPerDay' messages evenly, until every contact has been processed. If the campaign is activated while today's window is already open it starts immediately, sending only the share of the daily quota proportional to the remaining time; if today's window is already closed, it starts the next day.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The ID of the customer account.

Body Params

Recipients ('selection', 'contacts' or 'phoneNumbers') are optional: a campaign created without any stays scheduled and idle, sending nothing until contacts are added via the add-contacts endpoint. The config must define the daily send window ('dailyStartAt' + 'dailyEndAt', or 'immediate'); the legacy 'distributionDuration' field is still accepted and converted server-side.

string
required

Name of the campaign.

template
object
required

Represents a message template identifier.

date-time
required

ISO 8601 timestamp for the day the campaign starts. Only the DATE part matters and it must not be in the past (today is valid even when the daily window is already open or closed: sending starts right away with a prorated batch, or the next day). The daily send times are defined in 'config'.

string
enum
required
Allowed:
config
object
selection
object
contacts
array of objects

List of contacts to include in the campaign.

contacts
Responses

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json