Appearance
Rule.io SDK / client/src / CreateEmailAutomationMessagePayload
Interface: CreateEmailAutomationMessagePayload
Defined in: client/src/resources/messages/messages.types.ts:226
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?
optionalautomailSetting?:AutomailSetting
Defined in: client/src/resources/messages/messages.types.ts:245
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?
optionalfromEmail?:string|null
Defined in: client/src/resources/messages/messages.types.ts:234
From address (e.g. "jane@acme.com").
fromName?
optionalfromName?:string|null
Defined in: client/src/resources/messages/messages.types.ts:232
Display name of the sender (e.g. "Jane from Acme").
preheader?
optionalpreheader?:string|null
Defined in: client/src/resources/messages/messages.types.ts:230
Short preview text shown in inbox previews.
subject
subject:
string
Defined in: client/src/resources/messages/messages.types.ts:228
Email subject line shown to recipients. Required.
utmCampaign?
optionalutmCampaign?:string|null
Defined in: client/src/resources/messages/messages.types.ts:236
UTM campaign parameter appended to tracked links.
utmTerm?
optionalutmTerm?:string|null
Defined in: client/src/resources/messages/messages.types.ts:238
UTM term parameter appended to tracked links.