Britive platform release 2026.09.02 is now live in production.

Add a custom theme (draft)

Prev Next
Post
/api/themes

Adds a single new theme to the draft (max 2 total) — a create-only operation; the tenant's existing draft themes are left untouched. Rejected once the draft already holds 2 themes. Use PATCH /api/themes/ to edit an existing draft theme, and POST /api/themes/publish/ to publish it. Admin only.

Security
HTTP
Type bearer
Query parameters
apply
string

Theme ID to apply to the current user after saving. Must be an id already in the applied (live) list — it can never be the theme this same call just created, since a brand-new draft theme has no applied-side id until it is separately published via POST /api/themes/publish/. Use this only to switch the caller to a different, already-live theme.

Body parameters
Expand All
object
name
string

Theme display name.

isDefault
boolean

Whether this is the tenant default theme.

Defaultfalse
useBrandAssets
boolean

When true, tenant branding (logo, favicon) is shown while this theme is active.

Defaulttrue
isDark
boolean

Whether this is a dark-mode theme.

Defaultfalse
logo
string

Which logo variant to display when this theme is active. 'default' follows the theme's isDark flag, 'Dark' always uses the dark logo, 'Light' always uses the light logo.

Valid values[ "default", "Dark", "Light" ]
Default"default"
values
object

CSS variable map (variable name → color value).

property*
string additionalProperties
Responses
200

Added successfully — returns the newly created theme

Expand All
object
id
string

Unique theme ID, generated on creation.

name
string

Theme display name.

isDefault
boolean

Whether this is the tenant default theme.

Defaultfalse
useBrandAssets
boolean

When true, tenant branding (logo, favicon) is shown while this theme is active.

Defaulttrue
isDark
boolean

Whether this is a dark-mode theme.

Defaultfalse
logo
string

Which logo variant to display when this theme is active. 'default' follows the theme's isDark flag, 'Dark' always uses the dark logo, 'Light' always uses the light logo.

Valid values[ "default", "Dark", "Light" ]
Default"default"
values
object

CSS variable map (variable name → color value).

property*
string additionalProperties
isPublished
boolean

Whether this theme's content currently matches what's applied.

400

Validation error, or the draft already holds the maximum of 2 themes

403

Forbidden