Skip to main content
A Theme belongs to an Environment and holds the default token set. A vendor shipping more than one product is not forced onto a shared base — an Environment can hold any number of Themes. This page covers the Theme entity. Its tokens are a sub-resource with its own rules; see Theme tokens.

Endpoints

List Themes

string
Exact match. This is how you turn a slug you know into the id you address by.
string
default:"ascending"
integer
default:"1"
integer
default:"100"
boolean
default:"false"

Create a Theme

integration is a single pair, and it is optional. A Theme created without one serves nothing until you add one.
There is no Location header on the 201. Building one means knowing the route template, which lives on the endpoint rather than in the code that writes the response, and a wrong Location is worse than none. The created resource’s id is in the body.

Update a Theme

Renames the Theme and sets its labels. It cannot touch tokens or integrations — those are different surfaces with different access levels.
metadata is the one field on this PUT that is not a whole-resource replace.Omit it and the stored labels are left alone. Send {} and they are cleared. That is deliberate: a client renaming a Theme should not have to re-send labels it never read.Everything else on this request is a replace. slug and displayName are both required.

Label rules

An empty value is allowed — a key on its own is a flag, and refusing it only makes people invent "true".

Change what a Theme is served for

Returns the whole Theme, 200. The body is the whole list, never an add or a remove. To add a pair, read the Theme, append, and send the result. Two administrators editing at once are settled by the write itself; a merge would have to guess. The server refuses an empty list, a duplicate pair, and a pair the catalogue does not offer — all 400. A Theme with no integrations serves nothing, so emptying the list is not how you turn serving off. (Set the serving mode in the portal for that.)
This is admin, where renaming is editor. The pairs decide which files the publish pipeline builds for every published version and every Variant of the Theme, which is administration of what the Environment serves rather than authoring in it.

What each pair makes the Theme serve

The response’s servingUrls lists exactly the files the current integrations require, so you never see a URL that answers 404 by design. “Universal” is plainCSS, tailwindCSS and buildTimeTokens.
Changing the list takes a few seconds to reach the edge. Files a removed pair alone needed are deleted from every published version, and files an added pair needs are written — asynchronously, after the response returns. The servingUrls on the response already list the new set, so polling those URLs is the right way to wait.

Delete a Theme

Deletes the Theme, every Variant beneath it, and every version of both. Answers 200 with the parent Environment — not a 204 — because your next question is what the Environment holds now.
This is immediate and irreversible. Published versions are immutable until the Theme is deleted; deletion removes them. Anything reading its serving URLs starts getting 404.

The Theme resource

string
required
string
required
string
required
string
required
integer
required
Tokens in the current document — the draft if there is one, otherwise the newest published version.
integer | null
The newest published version number, or null if nothing has been published.
string | null
When that version was published. null alongside a null latestVersion.
boolean
required
Whether a draft is standing on top of the published version. “Is there a draft” and “are there unpublished changes” are the same question — an edit that reverted itself leaves nothing behind.
array
required
The framework and library pairs. See above.
object
required
Your labels. Never a secret.
object
required
How the edge treats requests for this Theme. Read-only on this API.
object
required
What the served assets were built with. Live, not draft — a publish is the only thing that writes them.Publishing asset settings is not on this API yet — it creates a Theme version, which makes it a publish rather than a settings write.
object
required
Where this Theme’s own files — no Variant applied — are served.
string
required
string
required