Skip to main content
POST
Create draft email campaign

Authorizations

Authorization
string
header
required

API key created in the organization settings.

Headers

Idempotency-Key
string

Unique key for the operation. Repeating the same key with the same body returns the original response instead of running it again.

Body

application/json
name
string
required
Required string length: 1 - 191
email_template_id
string
required
Pattern: ^etp_[A-Za-z0-9_-]+$
segment_ids
string[]
required
Required array length: 1 - 20 elements
Pattern: ^seg_[A-Za-z0-9_-]+$
operation_id
string

Optional unique id for this call, such as a UUID. Reuse the same value only to retry the same call: the retry returns the first result instead of creating again. The same value with a different body is rejected with 409.

Required string length: 8 - 128

Response

Campaign found.

object
string
required
Allowed value: "email_campaign"
id
string
required
Pattern: ^emc_[A-Za-z0-9_-]+$
status
string
required
scheduling_type
string
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
html_url
string<uri>
required
name
string
scheduled_for
string<date-time>
sent_at
string<date-time>
metrics
object