curl --request PATCH \
--url http://localhost:3000/api/v1/brands/{slug}/theme \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accent": "<string>",
"surface": "<string>",
"panel": "<string>",
"dark": "<string>",
"ink": "<string>",
"muted": "<string>",
"head": "<string>",
"body": "<string>",
"label": "<string>",
"logo": "<string>",
"device": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"radius": 20,
"scale": 1.3425,
"band": true,
"numbering": true,
"languages": [
{
"code": "<string>",
"label": "<string>"
}
]
}
'import requests
url = "http://localhost:3000/api/v1/brands/{slug}/theme"
payload = {
"accent": "<string>",
"surface": "<string>",
"panel": "<string>",
"dark": "<string>",
"ink": "<string>",
"muted": "<string>",
"head": "<string>",
"body": "<string>",
"label": "<string>",
"logo": "<string>",
"device": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"radius": 20,
"scale": 1.3425,
"band": True,
"numbering": True,
"languages": [
{
"code": "<string>",
"label": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accent: '<string>',
surface: '<string>',
panel: '<string>',
dark: '<string>',
ink: '<string>',
muted: '<string>',
head: '<string>',
body: JSON.stringify('<string>'),
label: '<string>',
logo: '<string>',
device: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
radius: 20,
scale: 1.3425,
band: true,
numbering: true,
languages: [{code: '<string>', label: '<string>'}]
})
};
fetch('http://localhost:3000/api/v1/brands/{slug}/theme', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/brands/{slug}/theme",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'accent' => '<string>',
'surface' => '<string>',
'panel' => '<string>',
'dark' => '<string>',
'ink' => '<string>',
'muted' => '<string>',
'head' => '<string>',
'body' => '<string>',
'label' => '<string>',
'logo' => '<string>',
'device' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'radius' => 20,
'scale' => 1.3425,
'band' => true,
'numbering' => true,
'languages' => [
[
'code' => '<string>',
'label' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/v1/brands/{slug}/theme"
payload := strings.NewReader("{\n \"accent\": \"<string>\",\n \"surface\": \"<string>\",\n \"panel\": \"<string>\",\n \"dark\": \"<string>\",\n \"ink\": \"<string>\",\n \"muted\": \"<string>\",\n \"head\": \"<string>\",\n \"body\": \"<string>\",\n \"label\": \"<string>\",\n \"logo\": \"<string>\",\n \"device\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"radius\": 20,\n \"scale\": 1.3425,\n \"band\": true,\n \"numbering\": true,\n \"languages\": [\n {\n \"code\": \"<string>\",\n \"label\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://localhost:3000/api/v1/brands/{slug}/theme")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accent\": \"<string>\",\n \"surface\": \"<string>\",\n \"panel\": \"<string>\",\n \"dark\": \"<string>\",\n \"ink\": \"<string>\",\n \"muted\": \"<string>\",\n \"head\": \"<string>\",\n \"body\": \"<string>\",\n \"label\": \"<string>\",\n \"logo\": \"<string>\",\n \"device\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"radius\": 20,\n \"scale\": 1.3425,\n \"band\": true,\n \"numbering\": true,\n \"languages\": [\n {\n \"code\": \"<string>\",\n \"label\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/brands/{slug}/theme")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accent\": \"<string>\",\n \"surface\": \"<string>\",\n \"panel\": \"<string>\",\n \"dark\": \"<string>\",\n \"ink\": \"<string>\",\n \"muted\": \"<string>\",\n \"head\": \"<string>\",\n \"body\": \"<string>\",\n \"label\": \"<string>\",\n \"logo\": \"<string>\",\n \"device\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"radius\": 20,\n \"scale\": 1.3425,\n \"band\": true,\n \"numbering\": true,\n \"languages\": [\n {\n \"code\": \"<string>\",\n \"label\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"brand": "<string>",
"settings": {
"accent": "<string>",
"accentUse": "fill",
"surface": "<string>",
"panel": "<string>",
"dark": "<string>",
"ink": "<string>",
"muted": "<string>",
"head": "<string>",
"body": "<string>",
"label": "<string>",
"logo": "<string>",
"device": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"radius": 20,
"width": "narrow",
"density": "compact",
"scale": 1.3425,
"nav": "sidebar",
"band": true,
"header": "plain",
"separation": "space",
"numbering": true,
"motion": "none",
"toc": "side",
"languages": [
{
"code": "<string>",
"label": "<string>",
"dir": "ltr"
}
]
},
"theme": {
"v1": {},
"surface": "<string>",
"panel": "<string>",
"dark": "<string>",
"ink": "<string>",
"muted": "<string>",
"onDark": "<string>",
"mutedOnDark": "<string>",
"accent": "<string>",
"accentText": "<string>",
"onAccent": "<string>",
"accentUse": "fill",
"line": "<string>",
"faces": {
"head": {
"family": "<string>",
"weight": 123,
"file": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"files": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime": "<string>"
}
],
"fallback": "<string>",
"google": true
},
"body": {
"family": "<string>",
"weight": 123,
"file": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"files": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime": "<string>"
}
],
"fallback": "<string>",
"google": true
},
"label": {
"family": "<string>",
"case": "<string>",
"tracking": 123,
"weight": 123,
"file": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"files": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime": "<string>"
}
],
"fallback": "<string>",
"google": true
}
},
"radius": 123,
"width": "narrow",
"density": "compact",
"scale": 123,
"device": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logo": {
"key": "<string>"
},
"nav": "sidebar",
"band": true,
"header": "plain",
"separation": "space",
"numbering": true,
"motion": "none",
"toc": "side",
"checks": [
{
"pair": "<string>",
"fg": "<string>",
"bg": "<string>",
"ratio": 123,
"need": 123,
"ok": true,
"used": "<string>"
}
]
},
"checks": [
{
"pair": "<string>",
"fg": "<string>",
"bg": "<string>",
"ratio": 123,
"need": 123,
"ok": true,
"used": "<string>"
}
],
"warnings": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"detail": "<unknown>"
}
}Change a brand's theme
Merges: a key left out keeps its value, null clears it. A color setting names a color rule, a font setting a font rule, logo a rule with a picture and device an image asset: a 422 names each that doesn’t, with its path. Answers with the look and its checks, as GET does. A draft in the brand’s history until it is published.
Scope: write.
curl --request PATCH \
--url http://localhost:3000/api/v1/brands/{slug}/theme \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accent": "<string>",
"surface": "<string>",
"panel": "<string>",
"dark": "<string>",
"ink": "<string>",
"muted": "<string>",
"head": "<string>",
"body": "<string>",
"label": "<string>",
"logo": "<string>",
"device": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"radius": 20,
"scale": 1.3425,
"band": true,
"numbering": true,
"languages": [
{
"code": "<string>",
"label": "<string>"
}
]
}
'import requests
url = "http://localhost:3000/api/v1/brands/{slug}/theme"
payload = {
"accent": "<string>",
"surface": "<string>",
"panel": "<string>",
"dark": "<string>",
"ink": "<string>",
"muted": "<string>",
"head": "<string>",
"body": "<string>",
"label": "<string>",
"logo": "<string>",
"device": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"radius": 20,
"scale": 1.3425,
"band": True,
"numbering": True,
"languages": [
{
"code": "<string>",
"label": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accent: '<string>',
surface: '<string>',
panel: '<string>',
dark: '<string>',
ink: '<string>',
muted: '<string>',
head: '<string>',
body: JSON.stringify('<string>'),
label: '<string>',
logo: '<string>',
device: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
radius: 20,
scale: 1.3425,
band: true,
numbering: true,
languages: [{code: '<string>', label: '<string>'}]
})
};
fetch('http://localhost:3000/api/v1/brands/{slug}/theme', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/brands/{slug}/theme",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'accent' => '<string>',
'surface' => '<string>',
'panel' => '<string>',
'dark' => '<string>',
'ink' => '<string>',
'muted' => '<string>',
'head' => '<string>',
'body' => '<string>',
'label' => '<string>',
'logo' => '<string>',
'device' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'radius' => 20,
'scale' => 1.3425,
'band' => true,
'numbering' => true,
'languages' => [
[
'code' => '<string>',
'label' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/v1/brands/{slug}/theme"
payload := strings.NewReader("{\n \"accent\": \"<string>\",\n \"surface\": \"<string>\",\n \"panel\": \"<string>\",\n \"dark\": \"<string>\",\n \"ink\": \"<string>\",\n \"muted\": \"<string>\",\n \"head\": \"<string>\",\n \"body\": \"<string>\",\n \"label\": \"<string>\",\n \"logo\": \"<string>\",\n \"device\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"radius\": 20,\n \"scale\": 1.3425,\n \"band\": true,\n \"numbering\": true,\n \"languages\": [\n {\n \"code\": \"<string>\",\n \"label\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://localhost:3000/api/v1/brands/{slug}/theme")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accent\": \"<string>\",\n \"surface\": \"<string>\",\n \"panel\": \"<string>\",\n \"dark\": \"<string>\",\n \"ink\": \"<string>\",\n \"muted\": \"<string>\",\n \"head\": \"<string>\",\n \"body\": \"<string>\",\n \"label\": \"<string>\",\n \"logo\": \"<string>\",\n \"device\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"radius\": 20,\n \"scale\": 1.3425,\n \"band\": true,\n \"numbering\": true,\n \"languages\": [\n {\n \"code\": \"<string>\",\n \"label\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/brands/{slug}/theme")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accent\": \"<string>\",\n \"surface\": \"<string>\",\n \"panel\": \"<string>\",\n \"dark\": \"<string>\",\n \"ink\": \"<string>\",\n \"muted\": \"<string>\",\n \"head\": \"<string>\",\n \"body\": \"<string>\",\n \"label\": \"<string>\",\n \"logo\": \"<string>\",\n \"device\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"radius\": 20,\n \"scale\": 1.3425,\n \"band\": true,\n \"numbering\": true,\n \"languages\": [\n {\n \"code\": \"<string>\",\n \"label\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"brand": "<string>",
"settings": {
"accent": "<string>",
"accentUse": "fill",
"surface": "<string>",
"panel": "<string>",
"dark": "<string>",
"ink": "<string>",
"muted": "<string>",
"head": "<string>",
"body": "<string>",
"label": "<string>",
"logo": "<string>",
"device": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"radius": 20,
"width": "narrow",
"density": "compact",
"scale": 1.3425,
"nav": "sidebar",
"band": true,
"header": "plain",
"separation": "space",
"numbering": true,
"motion": "none",
"toc": "side",
"languages": [
{
"code": "<string>",
"label": "<string>",
"dir": "ltr"
}
]
},
"theme": {
"v1": {},
"surface": "<string>",
"panel": "<string>",
"dark": "<string>",
"ink": "<string>",
"muted": "<string>",
"onDark": "<string>",
"mutedOnDark": "<string>",
"accent": "<string>",
"accentText": "<string>",
"onAccent": "<string>",
"accentUse": "fill",
"line": "<string>",
"faces": {
"head": {
"family": "<string>",
"weight": 123,
"file": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"files": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime": "<string>"
}
],
"fallback": "<string>",
"google": true
},
"body": {
"family": "<string>",
"weight": 123,
"file": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"files": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime": "<string>"
}
],
"fallback": "<string>",
"google": true
},
"label": {
"family": "<string>",
"case": "<string>",
"tracking": 123,
"weight": 123,
"file": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"files": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime": "<string>"
}
],
"fallback": "<string>",
"google": true
}
},
"radius": 123,
"width": "narrow",
"density": "compact",
"scale": 123,
"device": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logo": {
"key": "<string>"
},
"nav": "sidebar",
"band": true,
"header": "plain",
"separation": "space",
"numbering": true,
"motion": "none",
"toc": "side",
"checks": [
{
"pair": "<string>",
"fg": "<string>",
"bg": "<string>",
"ratio": 123,
"need": 123,
"ok": true,
"used": "<string>"
}
]
},
"checks": [
{
"pair": "<string>",
"fg": "<string>",
"bg": "<string>",
"ratio": 123,
"need": 123,
"ok": true,
"used": "<string>"
}
],
"warnings": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"detail": "<unknown>"
}
}Authorizations
An API key: ab_...
Path Parameters
Brand slug
Body
Color rule for links, marks and brand grounds; color.primary, brand or accent when left out
120^[a-z][a-zA-Z0-9]*(\.[a-z][a-zA-Z0-9]*)*$hairline: the accent draws rules and marks, never fills
fill, hairline The page ground; color.background, surface or paper when left out, else the app's
120^[a-z][a-zA-Z0-9]*(\.[a-z][a-zA-Z0-9]*)*$Panels and alternate sections; a step off the surface when left out
120^[a-z][a-zA-Z0-9]*(\.[a-z][a-zA-Z0-9]*)*$The dark ground
120^[a-z][a-zA-Z0-9]*(\.[a-z][a-zA-Z0-9]*)*$Text; color.ink, text or foreground when left out, else black or white by contrast
120^[a-z][a-zA-Z0-9]*(\.[a-z][a-zA-Z0-9]*)*$Quiet text; mixed from ink and surface when left out
120^[a-z][a-zA-Z0-9]*(\.[a-z][a-zA-Z0-9]*)*$Font rule for headings
120^[a-z][a-zA-Z0-9]*(\.[a-z][a-zA-Z0-9]*)*$Font rule for text
120^[a-z][a-zA-Z0-9]*(\.[a-z][a-zA-Z0-9]*)*$Font rule for eyebrows, labels and running heads; its spec.case and spec.tracking set them
120^[a-z][a-zA-Z0-9]*(\.[a-z][a-zA-Z0-9]*)*$The rule whose picture is the site's mark; logo.primary, mark or wordmark when left out
120^[a-z][a-zA-Z0-9]*(\.[a-z][a-zA-Z0-9]*)*$An SVG asset: the brand's symbol or pattern for covers, dividers and pattern grounds
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Corner radius in px
0 <= x <= 40narrow, normal, wide compact, normal, airy Heading size ratio; 1.25 when left out
1.067 <= x <= 1.618sidebar, top, overlay Every page opens on a band of the brand color; header band says the same
A page's opening: on the page, on a band of the brand color, or beside its cover
plain, band, split Between two sections on the page's own ground: space alone, or a hairline too
space, hairline Number chapters and pages: 01, 01.2
subtle: sections reveal as they scroll in; never with reduced motion
none, subtle On this page: a side column, a list under the page header, or hidden
side, inline, none The languages readers pick from; the first is the one the pages are written in
12Show child attributes
Show child attributes
Response
The theme
Show child attributes
Show child attributes