lumail.campaigns.create
SDK 2.1.0 · API v2 · POST /api/v2/campaigns
MethodPOST
/api/v2/campaigns[email protected] · lumail.campaigns
campaigns.create(params: CreateCampaignParams): Promise<LumailResult<CreateCampaignResponse>>Creates a draft.
Body Parameters
| Name | Type | Description |
|---|---|---|
subject | string | Required. Subject line. |
name | string | Internal name. Defaults from subject when omitted. |
preview | string or null | Preview / preheader text. |
content | unknown | Campaign body (TipTap / markdown document). |
contentType | "MAILY" / "PLATE" / "MARKDOWN" | Editor format. |
senderId | string | Sending identity id. |
replyTo | string or null | Reply-To address. |
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Campaign id. |
name | string | Internal name. |
subject | string | Subject line. |
preview | string or null | Preview text. |
status | CampaignStatus | Usually DRAFT. |
contentType | ContentType | Editor format. |
senderId | string | Sending identity id. |
replyTo | string or null | Reply-To address. |
createdAt | string | Optional ISO 8601 timestamp. |
data is the campaign write result. Failures return { data: null, error: { name, message, statusCode } }.