Skip to main content
POST
Create a campaign

Authorizations

Authorization
string
header
required

Project-scoped secret API key (sk_…). Pass in the Authorization: Bearer <key> header. Grants access to the project the key was issued for.

Body

application/json

Create a new campaign. Subscription, provider, and target lists are required to send.

type
enum<string>
required

blast campaigns send to every user in the target lists. trigger campaigns fire per-user when an event matches.

Available options:
blast,
trigger
subscription_id
integer
required
provider_id
integer
required
name
string
Minimum string length: 1
channel
enum<string>

Delivery channel the campaign sends through.

Available options:
email,
text,
push,
webhook,
in_app
list_ids
integer[] | null
exclusion_list_ids
integer[] | null
send_in_user_timezone
boolean | null
send_at
string<date-time> | null
tags
string[] | null
custom_domain_id
integer | null
description
string | null

Response

The newly created campaign.

A one-off (blast) or per-user (trigger) send across one channel.

id
integer
required

Numeric campaign identifier.

Example:

24

project_id
integer
required
type
enum<string>
required

blast campaigns send to every user in the target lists. trigger campaigns fire per-user when an event matches.

Available options:
blast,
trigger
name
string
required
channel
enum<string>
required

Delivery channel the campaign sends through.

Available options:
email,
text,
push,
webhook,
in_app
subscription_id
integer
required

Subscription type a user must be opted in to in order to receive this campaign.

provider_id
integer
required

Delivery provider used to send the campaign.

state
enum<string>
required

Campaign lifecycle state. Set state: "scheduled" (with send_at) to send a blast; set state: "aborted" to cancel.

Available options:
draft,
scheduled,
loading,
running,
finished,
aborting,
aborted
created_at
string | null
required
updated_at
string | null
required
list_ids
integer[] | null

IDs of the lists targeted by the campaign.

exclusion_list_ids
integer[] | null

IDs of lists whose members should be excluded from the campaign.

subscription
object

Hydrated subscription type referenced by subscription_id.

provider
object

Hydrated delivery provider referenced by provider_id. Returned in the redacted public shape — see Provider schema. Credentials (data, auth, API keys, tokens) are NEVER included.

delivery
object

Aggregated delivery counters for the campaign.

tags
string[] | null
send_in_user_timezone
boolean | null

When true, send_at is interpreted as a wall-clock time in each user’s local timezone.

send_at

When the campaign should send. ISO 8601 string accepted on input.

custom_domain_id
integer | null

Optional override of the project’s default tracking and from-address domain.

created_by
integer | null

Admin who created the campaign. Null for system- or API-key-created campaigns.

created_by_admin
object | null

Safe display details for created_by, or null when the creator is system/API-key-created or no longer belongs to the project.

description
string | null

Internal-only description for the audit trail. Never shown to recipients.