A page of a preview
const url = 'http://localhost:3000/api/v1/previews/example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:3000/api/v1/previews/exampleWhat a preview’s link shows (POST …/previews): a page of the brand as a proposed change’s files say it, as GET …/view gives a page of the draft, every page open, assets signed. A 404 once it has closed.
No key needed.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The preview’s token, from its link
Query Parameters
Section titled “Query Parameters”The page’s slug; the first page when left out
The context the reader starts in
The reader’s language
Responses
Section titled “Responses”The page
object
object
object
object
object
Every context some rule is scoped to
The look, derived and graded, and the settings it came from
object
The accent, lifted for light and dark pages, and the faces, as before W3
object
A hex color
A hex color
A hex color
A hex color
A hex color
A hex color
The fill, as the brand has it: bands and buttons
The accent where it is text (links), at 4.5:1 on the surface
A hex color
A hex color
object
object
The font file for its weight
Every font file of the rule, one @font-face each
object
From Google Fonts, with no files here yet: set in its fallback until they are imported
object
The font file for its weight
Every font file of the rule, one @font-face each
object
From Google Fonts, with no files here yet: set in its fallback until they are imported
object
The font file for its weight
Every font file of the rule, one @font-face each
object
From Google Fonts, with no files here yet: set in its fallback until they are imported
In em
Header is band
On this page: a side column, a list under the page header, or none
Contrast of each pair in the look: one that fails falls back to a color that reads, and says which
object
Which color on which, e.g. ink on surface
The contrast it must reach: 4.5 for text, 3 for marks
The color used: fg when it passes, else its fallback
object
Hairline: the accent draws rules and marks, never fills
Corner radius in px
Heading size ratio; 1.25 when left out
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
Between two sections on the page’s own ground: space alone, or a hairline too
Number chapters and pages: 01, 01.2
Subtle: sections reveal as they scroll in; never with reduced motion
On this page: a side column, a list under the page header, or hidden
Section titles: headings (medium), or headlines (large, huge); a section’s own size wins
Alternate: every other section on the page’s own ground sits on the panel, so a long page has rhythm; canvas: under its header the page sits on the panel, dotted like a whiteboard, its section titles centered
The languages readers pick from; the first is the one the pages are written in
object
From the language when left out
Links beside search and print on the brand’s pages: its repository, its Figma library, its site
object
Http or https; a link to GitHub, Figma, npm and the like shows its icon
Every page the reader is listed, in order
object
The page it sits under; null at the top
On portals: who may read it
Its child pages show as tabs across its top
The first page, opening on a cover: never numbered
Above the reader: listed by title with a lock, nothing more
object
The page it sits under; null at the top
On portals: who may read it
Its child pages show as tabs across its top
The first page, opening on a cover: never numbered
What the reader gets: hidden ones for editors only
object
GET /api/v1/brand/templates lists them
Markdown
Its ground: plain, tint, brand, panel, dark, color, image or pattern
The rules it shows, by key, in order
Its template’s own settings
object
Markdown
Sections sharing a tab name show under one tab
object
A thing a template lists: a do or a don’t with its picture, a picture in a gallery
object
A rule it shows
Markdown
False: for reference, never offered as a download
A tab per context, its rules resolved for each
Shown only in this context
Landing: a front with no nav column, on-this-page or pager; book: a chapter
An old slug was asked for: the page’s slug now
Every context version of the rules the page binds, the theme’s, and those their specs name
object
Dotted, e.g. color.primary
The heading readers see; null: the key, in words
Null: the default
object
Pixels
400 regular, 700 bold
Its assets readers may see, in order; one that may not be used is left out
object
The assets it names that may be used, by id
object
object
A URL on this host
Larger, for a closer look
object
The file as uploaded
A collection section’s assets, by section id
object
object
object
A URL on this host
Larger, for a closer look
object
The file as uploaded
Why it shows nothing; editors only
With an updates section: the latest publishes, newest first, as many as its largest limit
object
What changed, in the publisher’s words
What it changed for readers since the publish before it
object
By key
object
Pages readers can reach: a hidden one is left out
object
object
object
object
Signatures by asset id, for visitors; empty for members
object
Editors only: what a reader would trip on, assets they won’t see, and theme pairs that fell back
Editors only: keys a section binds with no rule
Example
{ "data": { "view": { "theme": { "accentUse": "fill", "faces": { "head": { "google": true }, "body": { "google": true }, "label": { "google": true } }, "width": "narrow", "density": "compact", "nav": "sidebar", "header": "plain", "separation": "space", "motion": "none", "toc": "side", "settings": { "accentUse": "fill", "width": "narrow", "density": "compact", "nav": "sidebar", "header": "plain", "separation": "space", "motion": "none", "toc": "side", "titles": "medium", "grounds": "plain", "languages": [ { "dir": "ltr" } ] } }, "nav": [ { "audience": "everyone" } ], "page": { "audience": "everyone", "sections": [ { "width": "text", "items": [ { "verdict": "do" } ], "audience": "everyone" } ], "layout": "book" }, "rules": [ { "type": "color" } ], "media": { "additionalProperty": { "downloads": [ { "preset": "web" } ] } }, "collections": { "additionalProperty": { "items": [ { "downloads": [ { "preset": "web" } ] } ] } } } }}default
Section titled “default”An error
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}