Create a new email campaign (draft or send immediately)

Creates an email campaign. If action is send, the campaign is dispatched immediately after creation. Only one of template_id or content_html should be provided.

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

Required unless content_mode=ai.

string | null
string | null

Comma-separated BCC emails

uuid | null
string | null

Raw HTML body (used when no template_id)

string | null

JSON string of key/value pairs

string
enum
Defaults to static

static sends the template or content_html you provide. ai has the AI write the message for every send from ai_instruction; template_id and content_html are ignored, and subject is optional (leave it blank and the AI writes one; set it and it is used exactly). An ongoing or recurring campaign gets a fresh message each run, and each message is kept and listed at GET /api/campaigns/{id}/messages.

Allowed:
string | null

Required when content_mode=ai: 15–2000 characters describing what THIS campaign should say. It is used only for this campaign.

string
enum
Defaults to one_time

continuous stays active until stopped and sends once to each current or future subscribed contact (no repeats). recurring stays active until stopped and emails the WHOLE audience on every scheduled run; the audience is read at run time, so a contact added after a run receives nothing until the next run, then joins it. For both, action=send starts it and scheduled_at sets the earliest start.

Allowed:
string | null
enum

Required when delivery_mode=recurring.

Allowed:
integer | null

Required for weekly (0 = Sunday … 6 = Saturday) and monthly (1–31; 31 means the last day of a shorter month). Ignored for daily.

string | null

24-hour HH:MM in the account timezone. Defaults to 09:00.

string | null

Recurring only. No run happens before this. A date alone means the start of that day; a date-time is read in the account timezone. Omit to begin at the next scheduled slot.

string | null

Recurring only. The stop date: no run happens after it, and the campaign finishes (stop_reason=completed). A date alone means the END of that day, so a run that day still happens.

integer | null
1 to 1000

Recurring only. Finish after this many runs. Whichever of max_runs and ends_at comes first ends the campaign. A run that cannot send (empty audience, exhausted allowance, AI failure) still counts.

string | null

content_mode=ai only. Absolute http(s) image URL shown at the top of every AI-written message. Ignored for static campaigns.

string
enum
required
Allowed:
integer | null
string
enum
Allowed:
date-time | null

Future datetime to auto-send. Omit or null to save as draft. Ignored when action=send.

Responses

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