Skip to content

Rule.io SDK


Rule.io SDK / client/src / CreateEmailAutomationMessagePayload

Interface: CreateEmailAutomationMessagePayload

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

Payload for MessagesClient.createEmailAutomationMessage.

Extends the campaign message payload with automailSetting which controls when the automation fires and whether it is active. The automation 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.createEmailAutomationMessage(automationId, {
  subject: 'Welcome to Acme!',
  fromName: 'Jane from Acme',
  fromEmail: 'jane@acme.com',
  automailSetting: { active: true, delayInSeconds: '0' },
});

Properties ​

automailSetting? ​

optional automailSetting?: AutomailSetting

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

Automail delivery settings for this message.

Omitting this field leaves the setting unchanged on update, or uses the API default (active, no delay) on create.


fromEmail? ​

optional fromEmail?: string | null

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

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


fromName? ​

optional fromName?: string | null

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

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


preheader? ​

optional preheader?: string | null

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

Short preview text shown in inbox previews.


subject ​

subject: string

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

Email subject line shown to recipients. Required.


utmCampaign? ​

optional utmCampaign?: string | null

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

UTM campaign parameter appended to tracked links.


utmTerm? ​

optional utmTerm?: string | null

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

UTM term parameter appended to tracked links.