Appearance
Rule.io SDK / client/src / CreateDefaultEmailCampaignParams
Interface: CreateDefaultEmailCampaignParams
Defined in: client/src/resources/campaigns/campaigns.types.ts:433
Options for CampaignsClient.createDefaultEmailCampaign.
Creates a complete email campaign with all its dependencies in one call: campaign → message → template (built from brand style) → dynamic set.
Example
typescript
const result = await client.campaigns.createDefaultEmailCampaign({
brandStyleId: 42,
});Properties
brandStyleId
brandStyleId:
number
Defined in: client/src/resources/campaigns/campaigns.types.ts:441
Brand style ID used to build the default email template.
The SDK fetches the brand style and auto-generates an editor-compatible RCML template with a logo, placeholder content section, and footer. Not fetched when template.content is provided.
message?
optionalmessage?:Partial<CreateEmailCampaignMessagePayload>
Defined in: client/src/resources/campaigns/campaigns.types.ts:454
Optional overrides for the auto-created email message.
Any field provided here replaces the default. subject defaults to the campaign name when omitted.
name?
optionalname?:string
Defined in: client/src/resources/campaigns/campaigns.types.ts:445
Initial campaign name. Defaults to a generated name when omitted.
sendoutType?
optionalsendoutType?:CampaignSendoutType
Defined in: client/src/resources/campaigns/campaigns.types.ts:447
Sendout type. Defaults to 'marketing'.
template?
optionaltemplate?:object
Defined in: client/src/resources/campaigns/campaigns.types.ts:462
Optional overrides for the auto-created email template.
Provide content to supply a custom RCML document — this skips the brand style fetch entirely. Provide name to override the auto-generated template name.
content?
optionalcontent?:RcmlDocument
Custom RCML document. When omitted the SDK auto-generates a branded template from brandStyleId.
name?
optionalname?:string
Template name. Defaults to 'Campaign ${id} template'.