Themes
The CSS-variable map a site renders with, plus the branding and wiring around it: logo, favicon, main menu and footer block. A known variable takes a value of its kind, an unknown one survives a round trip, and :check weighs the colours' contrast.
List themes
How the site looks and what furniture it renders: the CSS-variable map, plus the logo, the favicon, the main menu and the footer block the layout pulls in. A website can hold several themes; which one it renders is the appearance.theme.default_theme setting, and that setting is view-overridable — so one view can wear a different theme, and swap its navigation and footer with it.
path Parameters
website_idId of the parent website.
query Parameters
page_sizeRows per page. Over the maximum is clamped, not rejected.
page_tokenOpaque token from a previous next_page_token. A token minted under a different order_by/filter is rejected.
skipRows to skip before the page (AIP-158). skip + page_size is capped at 10000; beyond that is OUT_OF_RANGE.
order_byComma-separated field [asc|desc], at most 3 keys. Default: create_time desc. Sortable: code, create_time, display_name.
filterAIP-160 subset (§8). Filterable: code, create_time, display_name. A field outside the list is INVALID_ARGUMENT.
List themes › Responses
One page of themes.
This page of themes, in the requested order.
next_page_tokenOpaque. Absent or empty means this was the last page.
total_sizeRows in the whole filtered collection, not in this page.
Create theme
How the site looks and what furniture it renders: the CSS-variable map, plus the logo, the favicon, the main menu and the footer block the layout pulls in. A website can hold several themes; which one it renders is the appearance.theme.default_theme setting, and that setting is view-overridable — so one view can wear a different theme, and swap its navigation and footer with it.
path Parameters
website_idId of the parent website.
Create theme › Request Body
display_nameThe theme's label in the admin.
codeThe theme's handle, unique on the website.
stylesThe CSS custom properties the site renders with, as a flat object keyed by variable name. Each token of theme_tokens takes a string of its kind — a colour, a length, a font stack, a number or a shadow — and a value of another kind is refused under styles.<token>; a token left out renders the engine's default. A variable this API has never heard of survives a round trip untouched, so a client may set one the renderer gained after this document was generated.
main_menu_idThe menus resource rendered as the site's main navigation.
footer_block_idThe cms_blocks resource rendered in the footer.
logo_media_idThe media resource used as the site's logo. Naming a new one while the website's media library is off is refused (MODULE_DISABLED).
favicon_media_idThe media resource used as the site's favicon. Naming a new one while the website's media library is off is refused (MODULE_DISABLED).
custom_cssA stylesheet appended after the theme's own, for the rules the variables cannot express.
Create theme › Responses
The created resource.
nameThe resource name (§5) — the identity of this resource, and the path that addresses it: websites/{website}/cms_pages/{cms_page}. It is the handle to store, not a human label.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
create_timeWhen the resource was created (RFC 3339, UTC).
update_timeWhen the resource last changed (RFC 3339, UTC).
etagVersion of the persisted state. Send it back in If-Match on Update or Delete and the write is rejected with ABORTED if anyone else changed the resource meanwhile (§14).
display_nameThe theme's label in the admin.
codeThe theme's handle, unique on the website.
stylesThe CSS custom properties the site renders with, as a flat object keyed by variable name. Each token of theme_tokens takes a string of its kind — a colour, a length, a font stack, a number or a shadow — and a value of another kind is refused under styles.<token>; a token left out renders the engine's default. A variable this API has never heard of survives a round trip untouched, so a client may set one the renderer gained after this document was generated.
main_menu_idThe menus resource rendered as the site's main navigation.
footer_block_idThe cms_blocks resource rendered in the footer.
logo_media_idThe media resource used as the site's logo. Naming a new one while the website's media library is off is refused (MODULE_DISABLED).
favicon_media_idThe media resource used as the site's favicon. Naming a new one while the website's media library is off is refused (MODULE_DISABLED).
custom_cssA stylesheet appended after the theme's own, for the rules the variables cannot express.
Get theme
How the site looks and what furniture it renders: the CSS-variable map, plus the logo, the favicon, the main menu and the footer block the layout pulls in. A website can hold several themes; which one it renders is the appearance.theme.default_theme setting, and that setting is view-overridable — so one view can wear a different theme, and swap its navigation and footer with it.
path Parameters
website_idId of the parent website.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
Headers
If-None-MatchA matching etag answers 304 with no body (§16).
Get theme › Responses
The resource.
nameThe resource name (§5) — the identity of this resource, and the path that addresses it: websites/{website}/cms_pages/{cms_page}. It is the handle to store, not a human label.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
create_timeWhen the resource was created (RFC 3339, UTC).
update_timeWhen the resource last changed (RFC 3339, UTC).
etagVersion of the persisted state. Send it back in If-Match on Update or Delete and the write is rejected with ABORTED if anyone else changed the resource meanwhile (§14).
display_nameThe theme's label in the admin.
codeThe theme's handle, unique on the website.
stylesThe CSS custom properties the site renders with, as a flat object keyed by variable name. Each token of theme_tokens takes a string of its kind — a colour, a length, a font stack, a number or a shadow — and a value of another kind is refused under styles.<token>; a token left out renders the engine's default. A variable this API has never heard of survives a round trip untouched, so a client may set one the renderer gained after this document was generated.
main_menu_idThe menus resource rendered as the site's main navigation.
footer_block_idThe cms_blocks resource rendered in the footer.
logo_media_idThe media resource used as the site's logo. Naming a new one while the website's media library is off is refused (MODULE_DISABLED).
favicon_media_idThe media resource used as the site's favicon. Naming a new one while the website's media library is off is refused (MODULE_DISABLED).
custom_cssA stylesheet appended after the theme's own, for the rules the variables cannot express.
Delete theme
How the site looks and what furniture it renders: the CSS-variable map, plus the logo, the favicon, the main menu and the footer block the layout pulls in. A website can hold several themes; which one it renders is the appearance.theme.default_theme setting, and that setting is view-overridable — so one view can wear a different theme, and swap its navigation and footer with it.
path Parameters
website_idId of the parent website.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
Headers
If-MatchThe etag the client last read. A mismatch is ABORTED (409) with the current resource in the error details (§14).
Delete theme › Responses
Deleted. No body (§7).
Update theme
How the site looks and what furniture it renders: the CSS-variable map, plus the logo, the favicon, the main menu and the footer block the layout pulls in. A website can hold several themes; which one it renders is the appearance.theme.default_theme setting, and that setting is view-overridable — so one view can wear a different theme, and swap its navigation and footer with it.
path Parameters
website_idId of the parent website.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
query Parameters
update_maskComma-separated field paths to merge. A field named here and sent as null is cleared; without the mask a null is dropped (§7, §11).
Headers
If-MatchThe etag the client last read. A mismatch is ABORTED (409) with the current resource in the error details (§14).
Update theme › Request Body
display_nameThe theme's label in the admin.
codeThe theme's handle, unique on the website.
stylesThe CSS custom properties the site renders with, as a flat object keyed by variable name. Each token of theme_tokens takes a string of its kind — a colour, a length, a font stack, a number or a shadow — and a value of another kind is refused under styles.<token>; a token left out renders the engine's default. A variable this API has never heard of survives a round trip untouched, so a client may set one the renderer gained after this document was generated.
main_menu_idThe menus resource rendered as the site's main navigation.
footer_block_idThe cms_blocks resource rendered in the footer.
logo_media_idThe media resource used as the site's logo. Naming a new one while the website's media library is off is refused (MODULE_DISABLED).
favicon_media_idThe media resource used as the site's favicon. Naming a new one while the website's media library is off is refused (MODULE_DISABLED).
custom_cssA stylesheet appended after the theme's own, for the rules the variables cannot express.
Update theme › Responses
The updated resource.
nameThe resource name (§5) — the identity of this resource, and the path that addresses it: websites/{website}/cms_pages/{cms_page}. It is the handle to store, not a human label.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
create_timeWhen the resource was created (RFC 3339, UTC).
update_timeWhen the resource last changed (RFC 3339, UTC).
etagVersion of the persisted state. Send it back in If-Match on Update or Delete and the write is rejected with ABORTED if anyone else changed the resource meanwhile (§14).
display_nameThe theme's label in the admin.
codeThe theme's handle, unique on the website.
stylesThe CSS custom properties the site renders with, as a flat object keyed by variable name. Each token of theme_tokens takes a string of its kind — a colour, a length, a font stack, a number or a shadow — and a value of another kind is refused under styles.<token>; a token left out renders the engine's default. A variable this API has never heard of survives a round trip untouched, so a client may set one the renderer gained after this document was generated.
main_menu_idThe menus resource rendered as the site's main navigation.
footer_block_idThe cms_blocks resource rendered in the footer.
logo_media_idThe media resource used as the site's logo. Naming a new one while the website's media library is off is refused (MODULE_DISABLED).
favicon_media_idThe media resource used as the site's favicon. Naming a new one while the website's media library is off is refused (MODULE_DISABLED).
custom_cssA stylesheet appended after the theme's own, for the rules the variables cannot express.
Check (theme)
What is wrong with the theme's styles, weighed on what the site would render with it — its own values over the defaults of theme_tokens, var() followed — whether or not a website or a view wears it now. A GET custom method: a read no List filter can express (§10).
The answer is {"findings": [...]}, empty for a theme the check has nothing to say about. A finding has a code, a severity, the tokens it is about, a message in English and, where it has them, ratio, minimum_ratio and font_family. ERROR: LOW_CONTRAST — a pair of contrast_pairs reads below the contrast WCAG 2.2 AA asks of it, its ratio rounded down to two decimals; INVALID_VALUE — a stored token is not of its kind. WARNING: CONTRAST_UNCHECKED — a pair is written with a colour the check does not compute (color-mix(), oklch(), currentcolor); MISSING_TOKEN — tokens marked required the theme does not set, one finding naming them all; UNBUNDLED_FONT — the first family of a font stack is neither one the renderer ships (Inter, Poppins) nor a generic family, so a visitor sees it only where their device has it.
path Parameters
website_idId of the parent website.
idId of the themes resource this URL addresses.
Check (theme) › Responses
The method’s own response object (§10).
Preview (theme)
A link to the website's home page drawn with this theme, whether or not a website or a view wears it: {"preview_url": "https://<host>/?theme_preview=<token>", "expire_time": "…"}. The page shows the theme's styles, custom_css, logo and favicon over the site as it is — its menus, footer and content — with a bar saying it is a preview, and every link of the page keeps the preview. The link works for 30 minutes for whoever holds it, is signed by the platform (nothing in it can be changed) and is neither cached nor indexed; it shows the theme as it is stored when the page is opened, and changes nothing on the live site. No body. A website without a host yet is FAILED_PRECONDITION.
path Parameters
website_idId of the parent website.
idId of the themes resource this URL addresses.
Preview (theme) › Request Body optional
Preview (theme) › Responses
The affected resource, or the method’s own response object (§10).