Skip to content

Rule.io SDK


Rule.io SDK / client/src / CreateEmailCampaignMessagePayload

Interface: CreateEmailCampaignMessagePayload

Defined in: client/src/resources/messages/messages.types.ts:191

Payload for MessagesClient.createEmailCampaignMessage.

Provides the subject, sender details, and optional tracking parameters for an email message attached to a campaign. The campaign ID is passed as a separate argument.

All fields except subject are optional — the API uses account-level defaults when omitted.

Example

typescript
await client.messages.createEmailCampaignMessage(campaignId, {
  subject: 'Your order is on its way',
  fromName: 'Jane from Acme',
  fromEmail: 'jane@acme.com',
});

Properties

fromEmail?

optional fromEmail?: string | null

Defined in: client/src/resources/messages/messages.types.ts:199

From address (e.g. "jane@acme.com").


fromName?

optional fromName?: string | null

Defined in: client/src/resources/messages/messages.types.ts:197

Display name of the sender (e.g. "Jane from Acme").


preheader?

optional preheader?: string | null

Defined in: client/src/resources/messages/messages.types.ts:195

Short preview text shown in inbox previews.


subject

subject: string

Defined in: client/src/resources/messages/messages.types.ts:193

Email subject line shown to recipients. Required.


utmCampaign?

optional utmCampaign?: string | null

Defined in: client/src/resources/messages/messages.types.ts:201

UTM campaign parameter appended to tracked links.


utmTerm?

optional utmTerm?: string | null

Defined in: client/src/resources/messages/messages.types.ts:203

UTM term parameter appended to tracked links.