Save a page whole
const url = 'http://localhost:3000/api/v1/brands/example/pages/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"title":"example","hidden":true,"position":1,"sections":[{"id":"example","title":"example","body":"example","width":"text","columns":1,"tone":"plain","hidden":true,"keys":["example"],"eyebrow":"example","lede":"example","aside":"example","tab":"example","space":"tight","size":"medium","background":{"color":"example","to":"example","angle":1,"image":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","scrim":1},"items":[{"key":"example","asset":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","title":"example","text":"example","verdict":"do","caption":"example","link":"example","label":"example","icon":"example","download":true,"span":1,"at":["example"],"level":1}],"audience":"everyone","contexts":["example"],"only":"example","translations":{"additionalProperty":{"title":"example","eyebrow":"example","lede":"example","body":"example","aside":"example","items":[{"title":"example","text":"example","caption":"example"}]}},"template":"cover","props":{"image":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","video":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","align":"start","height":"auto","strip":true,"mark":"home","markFrame":"tile","markSize":"small","titleSize":"medium","by":"example","flip":true,"ratio":"even","fit":"auto","layout":"cards","show":["hex"],"media":"screen","matrix":true,"ase":true,"simulate":true,"sample":"example","roles":true,"glyphs":true,"embed":true,"formula":{"base":1,"ratio":1,"steps":1},"kit":true,"ask":true,"size":"medium","backdrop":"checker","collection":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","search":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","query":"example","sort":"newest","limit":1,"downloads":true,"from":"example","depth":1,"kind":"clearspace","positions":["tl"],"partner":"example","separator":"line","asset":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","scales":[1],"form":[{"name":"example","label":"example"}],"template":"example","url":"https://example.com","aspect":"16:9","prompt":"example"}}],"parent":"example","eyebrow":"example","lede":"example","cover":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","icon":"folder","audience":"everyone","tabs":true,"layout":"book","translations":{"additionalProperty":{"title":"example","eyebrow":"example","lede":"example"}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://localhost:3000/api/v1/brands/example/pages/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "example", "hidden": true, "position": 1, "sections": [ { "id": "example", "title": "example", "body": "example", "width": "text", "columns": 1, "tone": "plain", "hidden": true, "keys": [ "example" ], "eyebrow": "example", "lede": "example", "aside": "example", "tab": "example", "space": "tight", "size": "medium", "background": { "color": "example", "to": "example", "angle": 1, "image": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "scrim": 1 }, "items": [ { "key": "example", "asset": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "title": "example", "text": "example", "verdict": "do", "caption": "example", "link": "example", "label": "example", "icon": "example", "download": true, "span": 1, "at": [ "example" ], "level": 1 } ], "audience": "everyone", "contexts": [ "example" ], "only": "example", "translations": { "additionalProperty": { "title": "example", "eyebrow": "example", "lede": "example", "body": "example", "aside": "example", "items": [ { "title": "example", "text": "example", "caption": "example" } ] } }, "template": "cover", "props": { "image": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "video": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "align": "start", "height": "auto", "strip": true, "mark": "home", "markFrame": "tile", "markSize": "small", "titleSize": "medium", "by": "example", "flip": true, "ratio": "even", "fit": "auto", "layout": "cards", "show": [ "hex" ], "media": "screen", "matrix": true, "ase": true, "simulate": true, "sample": "example", "roles": true, "glyphs": true, "embed": true, "formula": { "base": 1, "ratio": 1, "steps": 1 }, "kit": true, "ask": true, "size": "medium", "backdrop": "checker", "collection": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "search": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "query": "example", "sort": "newest", "limit": 1, "downloads": true, "from": "example", "depth": 1, "kind": "clearspace", "positions": [ "tl" ], "partner": "example", "separator": "line", "asset": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "scales": [ 1 ], "form": [ { "name": "example", "label": "example" } ], "template": "example", "url": "https://example.com", "aspect": "16:9", "prompt": "example" } } ], "parent": "example", "eyebrow": "example", "lede": "example", "cover": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "icon": "folder", "audience": "everyone", "tabs": true, "layout": "book", "translations": { "additionalProperty": { "title": "example", "eyebrow": "example", "lede": "example" } } }'Makes the page, or replaces its title and every section, top to bottom. A page field left out keeps its value; null clears it. Sections keep their ids; new ones get one. Each section is checked against its own template (GET /api/v1/brand/templates), its keys against the rules and its assets against the library: a 422 lists every problem with its path, e.g. sections[1].props.chanel: Unrecognized key. A slug that isn’t one is a 422 too. A draft until the brand is published.
Scope: write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Brand slug
The page’s slug, e.g. logo
Header Parameters
Section titled “Header Parameters”The page’s revision (also its ETag) the change was made from. When the page says something else now, nothing is written: a 409 conflict with the revision it has in detail.revision. Left out, the write applies to the page as it is.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Kept, but not published
Where among the brand’s pages, from 0; the end for a new page
The whole page, top to bottom
object
Kept across edits
Markdown (GFM), shown under the title
Text: a reading column
Panel: second surface; color, image: see background
Kept, but not shown to readers
The rules it shows, by key, in order
Above the title: a number, a chapter
Under the title, set large; plain text
Markdown in a ruled column beside the body
Sections sharing a tab name show under one tab
Room above it
Title size
For tone color and tone image
object
Tone color: the color rule it is set on
Tone color: a color rule to fade into
With to: degrees, 180 when left out
Tone image: the picture
Tone image: darkening, 0.45 when left out
What the template lists (list_templates)
object
A rule it shows, by key
An image, video or file, from search_assets
Markdown
A do (green) or a don’t (red)
The asset’s description when left out
A small tag: Figma, PDF, Partners only
One of the icons a page takes
False: never offered as a download
Gallery bento: 2 takes two cells
Annotated: [x, y], % from the top left
Cards tree: 0 at the top
On portals: who may read it
A tab per context: [“default”, “dark-background”]
Shown only in this context
object
Cover: Over the color; header: In the band; quote: A portrait; split: Beside the words; annotated
Cover: A muted loop over the image, its poster
Cover: start, center, end; statement, split: start, center
Cover
Cover: true when left out
Cover: Logo above the title
Cover
Cover
Cover
Quote: Who said it
Split: Image on the left
Split: The wider side
Split
Cards: cards, list, stats, steps, checklist, tree; dodont: pairs, grid, rows; gallery: grid, bento, carousel, strip, collage, crops; collection: grid, masonry, list; links, pages: cards, list; faq: accordion, definitions
Palette: Values listed; all it has when left out
Palette: Values it opens on; screen when left out
Palette: Contrast of every pair
Palette: An .ase swatch download
Palette: Color blindness views
Type: The specimen’s starting text
Type: A table of roles
Type: Character sets
Type: Code to load the faces
Type: base in px
object
Logos: A zip of every mark; true when left out
Logos: Which mark for which context
Logos, icons: In its tile
Logos
Collection, icons: A collection’s id
Collection, icons: A saved search’s id
Collection, icons: q=poster&type=image&tag=campaign
Collection, icons: newest, oldest, name
Collection: 24 when left out; icons; updates: 5 when left out, 20 at most
Collection, icons: true when left out
Pages: Whose children; this page when left out
Pages: Levels down
Diagram: clearspace when left out; specimen: spacing, radius, shadow, motion, grid; chart: bar, line, donut; request: asset, review, question
Diagram: placement: where it may sit
Diagram: cobrand: their name
Diagram: cobrand: line when left out
Pattern: The tile
Pattern: Tile sizes, as multiples
Copy: Fields readers fill
object
Copy: Their words go in its {name} slots
Embed: https
Embed
Request: What to ask for
On portals: who may read it
Its child pages as tabs across its top
Landing: no nav or pager; book when left out
Responses
Section titled “Responses”Replaced
object
object
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
Slugs it had before a rename: they still find it
Landing: a front with no nav column, on-this-page or pager; book: a chapter
The last change to what it says
What it says, as a hash: send it back in If-Match (edit_page and save_page: revision) to refuse a write over a change you haven’t seen
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
What a reader would trip on, though it saves: links that go nowhere, keys with no rule
Where a member reads it in the app
Example
{ "data": { "page": { "audience": "everyone", "layout": "book", "sections": [ { "width": "text", "items": [ { "verdict": "do" } ], "audience": "everyone" } ] } }}Made
object
object
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
Slugs it had before a rename: they still find it
Landing: a front with no nav column, on-this-page or pager; book: a chapter
The last change to what it says
What it says, as a hash: send it back in If-Match (edit_page and save_page: revision) to refuse a write over a change you haven’t seen
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
What a reader would trip on, though it saves: links that go nowhere, keys with no rule
Where a member reads it in the app
Example
{ "data": { "page": { "audience": "everyone", "layout": "book", "sections": [ { "width": "text", "items": [ { "verdict": "do" } ], "audience": "everyone" } ] } }}The page changed since the If-Match revision: read it again, redo the change on what it says now
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}default
Section titled “default”An error
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}