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

NameTypeDescription
subjectstringRequired. Subject line.
namestringInternal name. Defaults from subject when omitted.
previewstring or nullPreview / preheader text.
contentunknownCampaign body (TipTap / markdown document).
contentType"MAILY" / "PLATE" / "MARKDOWN"Editor format.
senderIdstringSending identity id.
replyTostring or nullReply-To address.

Response Fields

FieldTypeDescription
idstringCampaign id.
namestringInternal name.
subjectstringSubject line.
previewstring or nullPreview text.
statusCampaignStatusUsually DRAFT.
contentTypeContentTypeEditor format.
senderIdstringSending identity id.
replyTostring or nullReply-To address.
createdAtstringOptional ISO 8601 timestamp.

data is the campaign write result. Failures return { data: null, error: { name, message, statusCode } }.