Skip to content

Rule.io SDK


Rule.io SDK / client/src / Campaign

Interface: Campaign

Defined in: client/src/resources/campaigns/campaigns.types.ts:100

A campaign entity as returned by the API.

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

Properties

createdAt

createdAt: string

Defined in: client/src/resources/campaigns/campaigns.types.ts:134

ISO 8601 timestamp of when the campaign was created.


id?

optional id?: number

Defined in: client/src/resources/campaigns/campaigns.types.ts:106

Campaign ID.

Optional because the API may omit it in partial responses.


messageType

messageType: CampaignStatus

Defined in: client/src/resources/campaigns/campaigns.types.ts:120

Message type: 1 = email, 2 = text message.

Returned as a status descriptor object by the API.


name

name: string

Defined in: client/src/resources/campaigns/campaigns.types.ts:108

Campaign name shown in the Rule.io UI.


numberOfRecipients?

optional numberOfRecipients?: number | null

Defined in: client/src/resources/campaigns/campaigns.types.ts:128

Total number of recipients.


recipients

recipients: CampaignRecipients

Defined in: client/src/resources/campaigns/campaigns.types.ts:132

Recipient targeting configuration.


sendoutType

sendoutType: CampaignStatus

Defined in: client/src/resources/campaigns/campaigns.types.ts:126

Sendout type: 1 = marketing, 2 = transactional.

Returned as a status descriptor object by the API.


status

status: CampaignStatus

Defined in: client/src/resources/campaigns/campaigns.types.ts:114

Current campaign status.

Common keys: 'draft', 'scheduled', 'sending', 'sent', 'paused'.


totalSent?

optional totalSent?: number | null

Defined in: client/src/resources/campaigns/campaigns.types.ts:130

Number of emails successfully sent.


updatedAt

updatedAt: string

Defined in: client/src/resources/campaigns/campaigns.types.ts:136

ISO 8601 timestamp of when the campaign was last updated.