Skip to content

Rule.io SDK


Rule.io SDK / client/src / resolveBrandTheme

Function: resolveBrandTheme()

resolveBrandTheme(client, overrideId?): Promise<ResolvedBrandTheme>

Defined in: client/src/brand-style-to-theme.ts:288

Resolve the account's preferred brand style and convert it to a ready-to-apply EmailTheme.

Discovery rules:

  1. If overrideId is provided, fetch that brand style directly.
  2. Otherwise, list all brand styles and pick the one flagged isDefault.
  3. If no style is flagged default, fall back to the first entry (source is set to 'fallback' so callers can warn).

Parameters

client

BrandThemeResolverClient

overrideId?

number

Returns

Promise<ResolvedBrandTheme>