curl --request PUT \
--url https://api.1club.ai/v1/platform/website/theme \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template": "gym-forge",
"tokens": {
"headingFontFamily": "Montserrat"
}
}
'{
"stored": {},
"resolved": {},
"sources": {},
"fadingBrandColors": [
"<string>"
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Set the website's design tokens
Merges a flat token patch into the site’s theme, optionally on top of a template’s look. Read GET /theme-tokens first for the tokens, their allowed values and the looks.
This writes the draft, like every other edit here — nothing a visitor sees changes until POST /releases publishes it. That is the point of tokens living on the website rather than on the organization’s branding: a palette change is previewable, versioned in the release, and revertible.
Merges field by field, so setting the heading font leaves the palette alone. Send null for a token to return it to what it inherits — from the organization’s branding, from another token, or from the platform default. That is the only way back once a value has been written; there is no “unset” string.
A template is the exception to that merge: it REPLACES the look rather than adding to it. Every token but the brand’s is cleared first, then the template’s values are written, along with its light and dark setting. Otherwise switching looks would leave the last one’s dark palette underneath, a hybrid nobody chose. A hand-picked brand colour is untouched, and so are pages and content. Sections added later start from the template’s styling, and restyleSections gives it to the sections already there.
When template and tokens are both sent the look is applied first and the tokens land on top, so “use the Forge look but keep our heading font” is one call.
Every problem with a patch is reported at once rather than one at a time. Tokens are validated against the catalog: an unknown key, a value outside a token’s options, a font the site cannot load, or a colour that is not a hex are all refused rather than stored — a colour CSS cannot parse does not fall back, it paints the surface transparent.
curl --request PUT \
--url https://api.1club.ai/v1/platform/website/theme \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template": "gym-forge",
"tokens": {
"headingFontFamily": "Montserrat"
}
}
'{
"stored": {},
"resolved": {},
"sources": {},
"fadingBrandColors": [
"<string>"
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Body
Was this page helpful?