Skip to main content
PATCH
Update a theme

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

projectId
string
required

Project ID

id
string
required

Theme ID

Body

application/json
name
string
Minimum string length: 1
isDefault
boolean

Set true to make this the project default theme (the previous default is cleared). false on the current default is rejected — default another theme instead; a project always keeps a default.

settings
object

Partial theme styling merged onto the theme's current settings (colors, fonts, sizes, …). Send only the fields you change; omitted fields are kept. This is pure INTENT: Auto-capable color fields take a hex or the literal "Auto" (derived at render); read what "Auto" resolves to with expand: ["resolvedSettings"].

variations
object[]

Conditional variations — FULL replacement of the list when present (a variation you omit is deleted; omit the field entirely to leave variations untouched). Array order is evaluation priority.

Response

Theme updated

id
string
required
object
enum<string>
required
Available options:
theme
name
string
required
isDefault
boolean
required
isSystem
boolean
required

Built-in theme: read-only — it cannot be updated or deleted (duplicating it into your own theme is the way to start from it). It CAN be made the project default.

updatedAt
string<date-time>
required
createdAt
string<date-time>
required
variationCount
integer
required

How many conditional variations this theme carries (always present, no expand needed). Check it BEFORE pointing content at another theme: variations do NOT travel with the content, so moving from a theme with variations to one with 0 silently drops the conditional styling (e.g. dark mode) for every user those conditions targeted — nothing errors. Read the variations themselves with expand: ["variations"].

Required range: -9007199254740991 <= x <= 9007199254740991
settings
object

Stored style INTENT — the same shape as the create/update settings body (that write schema is the field dictionary); Auto-capable colors read back as the literal "Auto".

resolvedSettings
object

Read-only render resolution of settings (the shared derivation the SDK runs). Two transformations: every "Auto" is replaced by the concrete derived color, and font.fontFamily is rewritten to the real font stack ("System font" → the system stack, "Custom font" → the customFontFamily value, named fonts gain a sans-serif fallback). Same field set as settings (stored settings are grounded complete at write) — differences between the two are exactly these derivations, so diff against the settings you wrote, not this, to find your edits. Request with expand: ["resolvedSettings"]. Not writable — author intent in settings.

variations
object[]