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
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
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’sservingUrls 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
200 with the
parent Environment — not a 204 — because your next question is what the Environment holds now.
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