Skip to content

Rule.io SDK


Rule.io SDK / client/src / Message

Interface: Message

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

A message entity as returned by the API.

This is the base return type for all message methods. For dispatcher- and message-type-specific call sites, prefer the named aliases (EmailCampaignMessage, EmailAutomationMessage) which make the method signature self-documenting.

Properties use camelCase; the wire format is normalised by the SDK.

Properties ​

automailSetting? ​

optional automailSetting?: AutomailSettingRead

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

Automail delivery state, present only on automation messages.

A discriminated union on type: "delay" carries a delayInSeconds value; "custom" indicates segment-driven delivery configured in the Rule.io UI and does not carry a delay. Campaign messages omit this field.


createdAt? ​

optional createdAt?: string

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

ISO 8601 timestamp of when the message was created.


dispatcher? ​

optional dispatcher?: MessageDispatcher

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

Dispatcher this message belongs to.

Present in responses from the v3 API.


fromEmail? ​

optional fromEmail?: string | null

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

Sending email address (e.g. "jane@acme.com").


fromName? ​

optional fromName?: string | null

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

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


id? ​

optional id?: number

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

Message ID.

Optional because the API may omit it in partial responses.


messageType? ​

optional messageType?: number

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

Message type code.

1 = email, 2 = SMS. Present in responses from the v3 API.


preheader? ​

optional preheader?: string | null

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

Short preview text displayed in inbox previews (the preheader).


subject ​

subject: string

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

Email subject line shown to recipients.


updatedAt? ​

optional updatedAt?: string

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

ISO 8601 timestamp of when the message was last updated.


utmCampaign? ​

optional utmCampaign?: string | null

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

UTM campaign parameter appended to tracked links in the email.


utmTerm? ​

optional utmTerm?: string | null

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

UTM term parameter appended to tracked links in the email.