Create Campaign
Create a draft campaign.
MethodPOST
/api/v2/campaignsCreates a draft campaign. Permission: campaigns.
Omitted content gets a default template with an unsubscribe link. Omitted senderId uses the default sender, then last used, then any available sender.
Body Parameters
| Name | Type | Description |
|---|---|---|
subject | string | Required. Email subject line. |
name | string | Campaign name. Default Untitled. Max 100. |
preview | string or null | Preview / preheader text. |
content | unknown | TipTap JSON (object or string). Default includes an unsubscribe link. |
contentType | "MAILY" | "PLATE" | "MARKDOWN" | Content format. Default MAILY. |
senderId | string | Email sender id. Defaults to the org default sender. |
replyTo | string or null | Reply-To address. |
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Campaign id. |
name | string | Campaign name. |
subject | string | Subject line. |
preview | string or null | Preview text. |
status | string | Always DRAFT on create. |
contentType | string | MAILY, PLATE, or MARKDOWN. |
senderId | string | Assigned sender id. |
replyTo | string or null | Reply-To address. |
createdAt | string | ISO 8601 created timestamp. |
Errors
| Status | name | When |
|---|---|---|
| 401 | missing_api_key | Missing or invalid bearer token |
| 403 | missing_permission | Token lacks the campaigns permission |
| 422 | validation_error | Missing subject or invalid payload |