Skip to content

Rule.io SDK


Rule.io SDK / client/src / BrandStyleFont

Interface: BrandStyleFont

Defined in: client/src/resources/brand-styles/brand-styles.types.ts:77

A font entry embedded in a BrandStyle.

Properties ​

brandStyleId ​

brandStyleId: number

Defined in: client/src/resources/brand-styles/brand-styles.types.ts:79


createdAt ​

createdAt: string

Defined in: client/src/resources/brand-styles/brand-styles.types.ts:114


fileUrl? ​

optional fileUrl?: string | null

Defined in: client/src/resources/brand-styles/brand-styles.types.ts:113

Direct download URL to the uploaded font binary on S3.

Populated with the S3 URL when origin is 'custom' AND a file has been uploaded to Rule.io as a binary (.ttf, .otf, .woff, .woff2). fetch() this URL to retrieve the raw file.

null when:

  • origin is 'system' or 'google' — these fonts are referenced by family name (or Google Fonts identifier in originId), not stored as a binary.
  • origin is 'custom' but the font binary has not been uploaded yet (rare — the API returns file: null in this state).

id ​

id: number

Defined in: client/src/resources/brand-styles/brand-styles.types.ts:78


name ​

name: string

Defined in: client/src/resources/brand-styles/brand-styles.types.ts:82

Font family name.


origin? ​

optional origin?: BrandStyleFontOrigin | null

Defined in: client/src/resources/brand-styles/brand-styles.types.ts:84

Where the font is sourced from.


originId? ​

optional originId?: string | null

Defined in: client/src/resources/brand-styles/brand-styles.types.ts:86

Google Fonts ID or other origin-specific identifier.


originName? ​

optional originName?: string | null

Defined in: client/src/resources/brand-styles/brand-styles.types.ts:88

Human-readable origin name.


type ​

type: BrandStyleFontType

Defined in: client/src/resources/brand-styles/brand-styles.types.ts:80


updatedAt ​

updatedAt: string

Defined in: client/src/resources/brand-styles/brand-styles.types.ts:115


url? ​

optional url?: string | null

Defined in: client/src/resources/brand-styles/brand-styles.types.ts:96

CSS endpoint URL that serves an @font-face stylesheet for this font.

Rule.io provides this as a proxy URL — use it in email templates to embed the font via HTML <link>. For direct download of the raw binary (custom fonts only), see fileUrl.


weights? ​

optional weights?: string[] | null

Defined in: client/src/resources/brand-styles/brand-styles.types.ts:98

Available font weights, e.g. ['400', '700'].