Create Campaign

Create a draft campaign.

MethodPOST
/api/v2/campaigns

Creates a draft campaign. Permission: campaigns.

Omitted MAILY content gets a default template with an unsubscribe link. Omitted HTML content gets an HTML starter that already includes {{unsubscribeUrl}}. Omitted senderId uses the default sender, then last used, then any available sender.

One footer per email: a MAILY content gets the organization's Default Footer snippet appended only when it has no footer of its own (no footer node, no footer snippet, no unsubscribe link). If you write your own footer, Lumail adds nothing. HTML content never gets a footer, and rendering adds none.

{
  "subject": "Product update",
  "contentType": "HTML",
  "content": "<html><body><table role=\"presentation\"><tr><td>Hello {{name}}</td></tr></table><p><a href=\"{{unsubscribeUrl}}\">Unsubscribe</a></p></body></html>"
}

Body Parameters

NameTypeDescription
subjectstringRequired. Email subject line.
namestringCampaign name. Default Untitled. Max 100.
previewstring or nullPreview / preheader text.
contentunknownMAILY: TipTap JSON. HTML: a raw HTML string that already includes <a href="{{unsubscribeUrl}}">Unsubscribe</a>. MAILY without its own footer gets the Default Footer snippet.
contentType"MAILY" | "HTML"Content format. Default MAILY.
senderIdstringEmail sender id. Defaults to the org default sender.
replyTostring or nullReply-To address.

Response Fields

FieldTypeDescription
idstringCampaign id.
namestringCampaign name.
subjectstringSubject line.
previewstring or nullPreview text.
statusstringAlways DRAFT on create.
contentTypestringMAILY or HTML.
senderIdstringAssigned sender id.
replyTostring or nullReply-To address.
createdAtstringISO 8601 created timestamp.

Errors

StatusnameWhen
401missing_api_keyMissing or invalid bearer token
403missing_permissionToken lacks the campaigns permission
422validation_errorMissing subject or invalid payload