Skip to main content
POST
Create a campaign

Authorizations

Authorization
string
header
required

API key for authentication

Headers

Idempotency-Key
string

A unique key, such as a UUID, that makes retrying this request safe: a retry with the same key and body returns the original response without running the operation again. Keys are kept for 24 hours after the request completes.

Maximum string length: 255
Example:

"8e03978e-40d5-43e8-bc93-6894a57f9324"

Body

application/json
target
enum<string>
required

What to do once the campaign is created. draft stores it, to be finished in the app or edited later. review also generates the message of every recipient, to read and edit once the campaign is in_review. launch generates them, then sends the campaign, now or at scheduledAt: ask the user to approve the campaign before launching it.

Available options:
draft,
review,
launch
Example:

"draft"

steps
object[]
required

The steps of the campaign: the first email, then its follow-ups. More than one step needs sequences on your plan, and a sender that supports them (not Gmail). With messages, a step without a body is written entirely by its messages: it needs one for every recipient.

Required array length: 1 - 100 elements
groupId
string

The group to create the campaign in. Its text and numeric custom fields can be used as variables. Leave it out to send to a list of contacts.

Required string length: 40
Example:

"grp_bc984b3f-0386-434d-82d7-a91eb6badd71"

sender
object

The sender of every step. Set either a root sender for every step, or a sender on every step, not both. Without any, every step is sent from the sender you last used.

Example:
stopOnReply
boolean

Whether the remaining steps stop for a recipient who replied. Defaults to true. With follow-ups, it needs a sender whose replies are tracked, its mailbox connected in the app: with any other sender, set it to false for the campaign to go to review.

Example:

true

scheduledAt
string<date-time>

When to send, with launch: an ISO date and time with a timezone offset or Z, not in the past. Campaigns send on the quarter hour (:00, :15, :30, :45): scheduledAt is rounded up to the next one, and the campaign returns the rounded time. Omit to send as soon as the messages are generated.

Maximum string length: 64
Example:

"2030-01-15T09:00:00+02:00"

recipients
object

Who receives the campaign. Optional with messages: the recipients are then those of the messages. With both, every recipient of a message must be selected here.

messages
object[]

Messages you wrote for some recipients, sent as they are instead of being generated from their step: one per recipient and step, at most 100. With review and launch only. Recipients without a message on a step get the step's template. Their recipients must exist, be accessible and have an email address, or nothing is created.

Maximum array length: 100

Response

The draft campaign created, with its steps.

data
object
required

A campaign: one or more emails, each a step, sent to a list of people or companies.

Example:
deprecations
string[]
Example:
warnings
string[]

What the campaign was created without, one sentence each: recipients skipped or without an email address, HTML simplified to the email editor's format, or a stopOnReply that the senders can't track replies for.