Skip to main content
POST
Error

Authorizations

X-API-Key
string
header
required

API key authentication

Body

application/json
allowDuplicates
boolean
default:false

Allow create campaign with the same name

Example:

true

body
string

Body of the email

Example:

"Hello, world!"

contactSpecification
object
contactStructureId
string

Id of the contact structure

editorType
enum<string>

Which editor produced the campaign body.

Available options:
unlayer,
code
emailDesign
string

Email design definition

from
string<email>

Email address of the sender

Example:

"user@example.com"

fromName
string

Name of the sender

Maximum string length: 100
Example:

"John Doe"

lists
string[] | null

List of list ids

name
string

Name of the email campaign

Example:

"Hello, world!"

previewText
string

Preview text of the email

Maximum string length: 100
Example:

"Amazing Offers, Don't miss them!"

replyToAddresses
string<email>[]

List of email addresses to reply to

subject
string

Subject of the email

Example:

"Hello, world!"

Response

Successfully created

__v
integer

Version of the record. Send it back unchanged on an update so a stale write is rejected instead of overwriting a newer one.

_id
string

Id of the campaign

body
string

Body of the email

cancelledAt
string | null

Timestamp when the campaign was cancelled or failed

contactSpecification
object
createdAt
string

Date and time of creation

editorType
enum<string>

Which editor produced the campaign body. Campaigns created before the editor choice existed read back as 'unlayer'.

Available options:
unlayer,
code
emailDesign
string

Email design definition

failedCount
number

Failed sent count

from
string

From email address

fromName
string

Name of the sender

hostedUrl
string | null

Public URL of the campaign's hosted copy. Always present; null unless the campaign sent successfully and its hosted artifact was stored.

imageOrigin
string<uri>

Present only when editorType is code. The image bucket's URL origin, for example https://.s3..amazonaws.com.

lists
string[] | null

List of list ids

name
string

Name of the campaign

plainTextBody
string

Plaintext version of the email body without HTML formatting

Example:

"Hello, world! This is a plaintext version of the email without any HTML formatting."

presignedImageUrls
string<uri>[]

Present only when editorType is code. The image URLs the server presigned into this response's body, exactly as they appear there, without duplicates. Each one expires with its signature.

previewImageUrl
string

URL of the last thumbnail that finished rendering. The thumbnail is rendered after the response is sent, so this value may lag a content-changing write and is absent on a freshly created campaign.

previewText
string

Preview text of the email

replyToAddresses
string<email>[]

List of email addresses to reply to

scheduledAt
string

Date and time of scheduled email

sentCount
number

Successfully sent count

status
string

Status of the campaign

subStatus
enum<string> | null

Granular failure/cancellation reason. Null for non-failure states or legacy campaigns.

Available options:
missing_billing_info,
account_suspended,
invalid_subscription,
system_error,
quota_exceeded,
circuit_breaker_bounce,
circuit_breaker_complaint,
circuit_breaker_combined,
rejected_automated_review,
rejected_manual_review,
null
subject
string

Subject of the email

totalRecipients
number

Contacts this campaign is expected to email. 0 until the campaign is scheduled (except for an explicit contact-list audience, counted at creation), then estimated from the audience; narrows to the mailable (active) population when the send begins — the figure the sending-allowance decision uses.

updatedAt
string

Date and time of last update