curl --request PUT \
--url http://localhost:3000/api/v1/brands/{slug}/pages/{page} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"sections": [
{
"id": "<string>",
"title": "<string>",
"body": "<string>",
"columns": 2,
"hidden": true,
"keys": [
"<string>"
],
"eyebrow": "<string>",
"lede": "<string>",
"aside": "<string>",
"tab": "<string>",
"background": {
"color": "<string>",
"image": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scrim": 0.45
},
"items": [
{
"key": "<string>",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"text": "<string>",
"caption": "<string>",
"link": "<string>",
"label": "<string>",
"icon": "<string>",
"download": true,
"span": 1,
"at": [
50,
50
],
"level": 1
}
],
"contexts": [
"<string>"
],
"only": "<string>",
"translations": {},
"props": {
"image": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"video": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"strip": true,
"flip": true,
"show": [],
"matrix": true,
"ase": true,
"simulate": true,
"sample": "<string>",
"roles": true,
"glyphs": true,
"embed": true,
"kit": true,
"ask": true,
"collection": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"search": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"query": "<string>",
"limit": 100,
"downloads": true,
"from": "<string>",
"depth": 2,
"positions": [],
"partner": "<string>",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scales": [
5.05
],
"form": [
{
"name": "<string>",
"label": "<string>"
}
],
"template": "<string>",
"url": "<string>",
"prompt": "<string>"
}
}
],
"hidden": true,
"position": 4503599627370495,
"parent": "<string>",
"eyebrow": "<string>",
"lede": "<string>",
"cover": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tabs": true,
"translations": {}
}
'import requests
url = "http://localhost:3000/api/v1/brands/{slug}/pages/{page}"
payload = {
"title": "<string>",
"sections": [
{
"id": "<string>",
"title": "<string>",
"body": "<string>",
"columns": 2,
"hidden": True,
"keys": ["<string>"],
"eyebrow": "<string>",
"lede": "<string>",
"aside": "<string>",
"tab": "<string>",
"background": {
"color": "<string>",
"image": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scrim": 0.45
},
"items": [
{
"key": "<string>",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"text": "<string>",
"caption": "<string>",
"link": "<string>",
"label": "<string>",
"icon": "<string>",
"download": True,
"span": 1,
"at": [50, 50],
"level": 1
}
],
"contexts": ["<string>"],
"only": "<string>",
"translations": {},
"props": {
"image": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"video": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"strip": True,
"flip": True,
"show": [],
"matrix": True,
"ase": True,
"simulate": True,
"sample": "<string>",
"roles": True,
"glyphs": True,
"embed": True,
"kit": True,
"ask": True,
"collection": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"search": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"query": "<string>",
"limit": 100,
"downloads": True,
"from": "<string>",
"depth": 2,
"positions": [],
"partner": "<string>",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scales": [5.05],
"form": [
{
"name": "<string>",
"label": "<string>"
}
],
"template": "<string>",
"url": "<string>",
"prompt": "<string>"
}
}
],
"hidden": True,
"position": 4503599627370495,
"parent": "<string>",
"eyebrow": "<string>",
"lede": "<string>",
"cover": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tabs": True,
"translations": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
sections: [
{
id: '<string>',
title: '<string>',
body: JSON.stringify('<string>'),
columns: 2,
hidden: true,
keys: ['<string>'],
eyebrow: '<string>',
lede: '<string>',
aside: '<string>',
tab: '<string>',
background: {color: '<string>', image: '3c90c3cc-0d44-4b50-8888-8dd25736052a', scrim: 0.45},
items: [
{
key: '<string>',
asset: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
title: '<string>',
text: '<string>',
caption: '<string>',
link: '<string>',
label: '<string>',
icon: '<string>',
download: true,
span: 1,
at: [50, 50],
level: 1
}
],
contexts: ['<string>'],
only: '<string>',
translations: {},
props: {
image: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
video: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
strip: true,
flip: true,
show: [],
matrix: true,
ase: true,
simulate: true,
sample: '<string>',
roles: true,
glyphs: true,
embed: true,
kit: true,
ask: true,
collection: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
search: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
query: '<string>',
limit: 100,
downloads: true,
from: '<string>',
depth: 2,
positions: [],
partner: '<string>',
asset: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
scales: [5.05],
form: [{name: '<string>', label: '<string>'}],
template: '<string>',
url: '<string>',
prompt: '<string>'
}
}
],
hidden: true,
position: 4503599627370495,
parent: '<string>',
eyebrow: '<string>',
lede: '<string>',
cover: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
tabs: true,
translations: {}
})
};
fetch('http://localhost:3000/api/v1/brands/{slug}/pages/{page}', 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}/pages/{page}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'sections' => [
[
'id' => '<string>',
'title' => '<string>',
'body' => '<string>',
'columns' => 2,
'hidden' => true,
'keys' => [
'<string>'
],
'eyebrow' => '<string>',
'lede' => '<string>',
'aside' => '<string>',
'tab' => '<string>',
'background' => [
'color' => '<string>',
'image' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'scrim' => 0.45
],
'items' => [
[
'key' => '<string>',
'asset' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'title' => '<string>',
'text' => '<string>',
'caption' => '<string>',
'link' => '<string>',
'label' => '<string>',
'icon' => '<string>',
'download' => true,
'span' => 1,
'at' => [
50,
50
],
'level' => 1
]
],
'contexts' => [
'<string>'
],
'only' => '<string>',
'translations' => [
],
'props' => [
'image' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'video' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'strip' => true,
'flip' => true,
'show' => [
],
'matrix' => true,
'ase' => true,
'simulate' => true,
'sample' => '<string>',
'roles' => true,
'glyphs' => true,
'embed' => true,
'kit' => true,
'ask' => true,
'collection' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'search' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'query' => '<string>',
'limit' => 100,
'downloads' => true,
'from' => '<string>',
'depth' => 2,
'positions' => [
],
'partner' => '<string>',
'asset' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'scales' => [
5.05
],
'form' => [
[
'name' => '<string>',
'label' => '<string>'
]
],
'template' => '<string>',
'url' => '<string>',
'prompt' => '<string>'
]
]
],
'hidden' => true,
'position' => 4503599627370495,
'parent' => '<string>',
'eyebrow' => '<string>',
'lede' => '<string>',
'cover' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'tabs' => true,
'translations' => [
]
]),
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}/pages/{page}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"sections\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"columns\": 2,\n \"hidden\": true,\n \"keys\": [\n \"<string>\"\n ],\n \"eyebrow\": \"<string>\",\n \"lede\": \"<string>\",\n \"aside\": \"<string>\",\n \"tab\": \"<string>\",\n \"background\": {\n \"color\": \"<string>\",\n \"image\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scrim\": 0.45\n },\n \"items\": [\n {\n \"key\": \"<string>\",\n \"asset\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"text\": \"<string>\",\n \"caption\": \"<string>\",\n \"link\": \"<string>\",\n \"label\": \"<string>\",\n \"icon\": \"<string>\",\n \"download\": true,\n \"span\": 1,\n \"at\": [\n 50,\n 50\n ],\n \"level\": 1\n }\n ],\n \"contexts\": [\n \"<string>\"\n ],\n \"only\": \"<string>\",\n \"translations\": {},\n \"props\": {\n \"image\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"video\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"strip\": true,\n \"flip\": true,\n \"show\": [],\n \"matrix\": true,\n \"ase\": true,\n \"simulate\": true,\n \"sample\": \"<string>\",\n \"roles\": true,\n \"glyphs\": true,\n \"embed\": true,\n \"kit\": true,\n \"ask\": true,\n \"collection\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"search\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"query\": \"<string>\",\n \"limit\": 100,\n \"downloads\": true,\n \"from\": \"<string>\",\n \"depth\": 2,\n \"positions\": [],\n \"partner\": \"<string>\",\n \"asset\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scales\": [\n 5.05\n ],\n \"form\": [\n {\n \"name\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"template\": \"<string>\",\n \"url\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n }\n ],\n \"hidden\": true,\n \"position\": 4503599627370495,\n \"parent\": \"<string>\",\n \"eyebrow\": \"<string>\",\n \"lede\": \"<string>\",\n \"cover\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tabs\": true,\n \"translations\": {}\n}")
req, _ := http.NewRequest("PUT", 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.put("http://localhost:3000/api/v1/brands/{slug}/pages/{page}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"sections\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"columns\": 2,\n \"hidden\": true,\n \"keys\": [\n \"<string>\"\n ],\n \"eyebrow\": \"<string>\",\n \"lede\": \"<string>\",\n \"aside\": \"<string>\",\n \"tab\": \"<string>\",\n \"background\": {\n \"color\": \"<string>\",\n \"image\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scrim\": 0.45\n },\n \"items\": [\n {\n \"key\": \"<string>\",\n \"asset\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"text\": \"<string>\",\n \"caption\": \"<string>\",\n \"link\": \"<string>\",\n \"label\": \"<string>\",\n \"icon\": \"<string>\",\n \"download\": true,\n \"span\": 1,\n \"at\": [\n 50,\n 50\n ],\n \"level\": 1\n }\n ],\n \"contexts\": [\n \"<string>\"\n ],\n \"only\": \"<string>\",\n \"translations\": {},\n \"props\": {\n \"image\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"video\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"strip\": true,\n \"flip\": true,\n \"show\": [],\n \"matrix\": true,\n \"ase\": true,\n \"simulate\": true,\n \"sample\": \"<string>\",\n \"roles\": true,\n \"glyphs\": true,\n \"embed\": true,\n \"kit\": true,\n \"ask\": true,\n \"collection\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"search\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"query\": \"<string>\",\n \"limit\": 100,\n \"downloads\": true,\n \"from\": \"<string>\",\n \"depth\": 2,\n \"positions\": [],\n \"partner\": \"<string>\",\n \"asset\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scales\": [\n 5.05\n ],\n \"form\": [\n {\n \"name\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"template\": \"<string>\",\n \"url\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n }\n ],\n \"hidden\": true,\n \"position\": 4503599627370495,\n \"parent\": \"<string>\",\n \"eyebrow\": \"<string>\",\n \"lede\": \"<string>\",\n \"cover\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tabs\": true,\n \"translations\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/brands/{slug}/pages/{page}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"sections\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"columns\": 2,\n \"hidden\": true,\n \"keys\": [\n \"<string>\"\n ],\n \"eyebrow\": \"<string>\",\n \"lede\": \"<string>\",\n \"aside\": \"<string>\",\n \"tab\": \"<string>\",\n \"background\": {\n \"color\": \"<string>\",\n \"image\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scrim\": 0.45\n },\n \"items\": [\n {\n \"key\": \"<string>\",\n \"asset\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"text\": \"<string>\",\n \"caption\": \"<string>\",\n \"link\": \"<string>\",\n \"label\": \"<string>\",\n \"icon\": \"<string>\",\n \"download\": true,\n \"span\": 1,\n \"at\": [\n 50,\n 50\n ],\n \"level\": 1\n }\n ],\n \"contexts\": [\n \"<string>\"\n ],\n \"only\": \"<string>\",\n \"translations\": {},\n \"props\": {\n \"image\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"video\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"strip\": true,\n \"flip\": true,\n \"show\": [],\n \"matrix\": true,\n \"ase\": true,\n \"simulate\": true,\n \"sample\": \"<string>\",\n \"roles\": true,\n \"glyphs\": true,\n \"embed\": true,\n \"kit\": true,\n \"ask\": true,\n \"collection\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"search\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"query\": \"<string>\",\n \"limit\": 100,\n \"downloads\": true,\n \"from\": \"<string>\",\n \"depth\": 2,\n \"positions\": [],\n \"partner\": \"<string>\",\n \"asset\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scales\": [\n 5.05\n ],\n \"form\": [\n {\n \"name\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"template\": \"<string>\",\n \"url\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n }\n ],\n \"hidden\": true,\n \"position\": 4503599627370495,\n \"parent\": \"<string>\",\n \"eyebrow\": \"<string>\",\n \"lede\": \"<string>\",\n \"cover\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tabs\": true,\n \"translations\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"brand": "<string>",
"created": true,
"page": {
"slug": "<string>",
"title": "<string>",
"position": 0,
"hidden": true,
"parent": "<string>",
"eyebrow": "<string>",
"lede": "<string>",
"cover": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"icon": "<string>",
"audience": "everyone",
"tabs": true,
"aliases": [
"<string>"
],
"layout": "book",
"updatedAt": "2023-11-07T05:31:56Z",
"sections": [
{
"id": "<string>",
"template": "<string>",
"title": "<string>",
"body": "<string>",
"width": "text",
"columns": 0,
"tone": "<string>",
"hidden": true,
"keys": [
"<string>"
],
"props": {},
"eyebrow": "<string>",
"lede": "<string>",
"aside": "<string>",
"tab": "<string>",
"background": {
"color": "<string>",
"image": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scrim": 123
},
"items": [
{
"key": "<string>",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"text": "<string>",
"verdict": "do",
"caption": "<string>",
"link": "<string>",
"label": "<string>",
"icon": "<string>",
"download": true
}
],
"audience": "everyone",
"contexts": [
"<string>"
],
"only": "<string>",
"translations": {}
}
],
"translations": {}
},
"warnings": [
"<string>"
],
"url": "<string>"
}
}{
"data": {
"brand": "<string>",
"created": true,
"page": {
"slug": "<string>",
"title": "<string>",
"position": 0,
"hidden": true,
"parent": "<string>",
"eyebrow": "<string>",
"lede": "<string>",
"cover": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"icon": "<string>",
"audience": "everyone",
"tabs": true,
"aliases": [
"<string>"
],
"layout": "book",
"updatedAt": "2023-11-07T05:31:56Z",
"sections": [
{
"id": "<string>",
"template": "<string>",
"title": "<string>",
"body": "<string>",
"width": "text",
"columns": 0,
"tone": "<string>",
"hidden": true,
"keys": [
"<string>"
],
"props": {},
"eyebrow": "<string>",
"lede": "<string>",
"aside": "<string>",
"tab": "<string>",
"background": {
"color": "<string>",
"image": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scrim": 123
},
"items": [
{
"key": "<string>",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"text": "<string>",
"verdict": "do",
"caption": "<string>",
"link": "<string>",
"label": "<string>",
"icon": "<string>",
"download": true
}
],
"audience": "everyone",
"contexts": [
"<string>"
],
"only": "<string>",
"translations": {}
}
],
"translations": {}
},
"warnings": [
"<string>"
],
"url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"detail": "<unknown>"
}
}Save a page whole
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.
curl --request PUT \
--url http://localhost:3000/api/v1/brands/{slug}/pages/{page} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"sections": [
{
"id": "<string>",
"title": "<string>",
"body": "<string>",
"columns": 2,
"hidden": true,
"keys": [
"<string>"
],
"eyebrow": "<string>",
"lede": "<string>",
"aside": "<string>",
"tab": "<string>",
"background": {
"color": "<string>",
"image": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scrim": 0.45
},
"items": [
{
"key": "<string>",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"text": "<string>",
"caption": "<string>",
"link": "<string>",
"label": "<string>",
"icon": "<string>",
"download": true,
"span": 1,
"at": [
50,
50
],
"level": 1
}
],
"contexts": [
"<string>"
],
"only": "<string>",
"translations": {},
"props": {
"image": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"video": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"strip": true,
"flip": true,
"show": [],
"matrix": true,
"ase": true,
"simulate": true,
"sample": "<string>",
"roles": true,
"glyphs": true,
"embed": true,
"kit": true,
"ask": true,
"collection": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"search": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"query": "<string>",
"limit": 100,
"downloads": true,
"from": "<string>",
"depth": 2,
"positions": [],
"partner": "<string>",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scales": [
5.05
],
"form": [
{
"name": "<string>",
"label": "<string>"
}
],
"template": "<string>",
"url": "<string>",
"prompt": "<string>"
}
}
],
"hidden": true,
"position": 4503599627370495,
"parent": "<string>",
"eyebrow": "<string>",
"lede": "<string>",
"cover": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tabs": true,
"translations": {}
}
'import requests
url = "http://localhost:3000/api/v1/brands/{slug}/pages/{page}"
payload = {
"title": "<string>",
"sections": [
{
"id": "<string>",
"title": "<string>",
"body": "<string>",
"columns": 2,
"hidden": True,
"keys": ["<string>"],
"eyebrow": "<string>",
"lede": "<string>",
"aside": "<string>",
"tab": "<string>",
"background": {
"color": "<string>",
"image": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scrim": 0.45
},
"items": [
{
"key": "<string>",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"text": "<string>",
"caption": "<string>",
"link": "<string>",
"label": "<string>",
"icon": "<string>",
"download": True,
"span": 1,
"at": [50, 50],
"level": 1
}
],
"contexts": ["<string>"],
"only": "<string>",
"translations": {},
"props": {
"image": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"video": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"strip": True,
"flip": True,
"show": [],
"matrix": True,
"ase": True,
"simulate": True,
"sample": "<string>",
"roles": True,
"glyphs": True,
"embed": True,
"kit": True,
"ask": True,
"collection": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"search": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"query": "<string>",
"limit": 100,
"downloads": True,
"from": "<string>",
"depth": 2,
"positions": [],
"partner": "<string>",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scales": [5.05],
"form": [
{
"name": "<string>",
"label": "<string>"
}
],
"template": "<string>",
"url": "<string>",
"prompt": "<string>"
}
}
],
"hidden": True,
"position": 4503599627370495,
"parent": "<string>",
"eyebrow": "<string>",
"lede": "<string>",
"cover": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tabs": True,
"translations": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
sections: [
{
id: '<string>',
title: '<string>',
body: JSON.stringify('<string>'),
columns: 2,
hidden: true,
keys: ['<string>'],
eyebrow: '<string>',
lede: '<string>',
aside: '<string>',
tab: '<string>',
background: {color: '<string>', image: '3c90c3cc-0d44-4b50-8888-8dd25736052a', scrim: 0.45},
items: [
{
key: '<string>',
asset: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
title: '<string>',
text: '<string>',
caption: '<string>',
link: '<string>',
label: '<string>',
icon: '<string>',
download: true,
span: 1,
at: [50, 50],
level: 1
}
],
contexts: ['<string>'],
only: '<string>',
translations: {},
props: {
image: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
video: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
strip: true,
flip: true,
show: [],
matrix: true,
ase: true,
simulate: true,
sample: '<string>',
roles: true,
glyphs: true,
embed: true,
kit: true,
ask: true,
collection: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
search: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
query: '<string>',
limit: 100,
downloads: true,
from: '<string>',
depth: 2,
positions: [],
partner: '<string>',
asset: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
scales: [5.05],
form: [{name: '<string>', label: '<string>'}],
template: '<string>',
url: '<string>',
prompt: '<string>'
}
}
],
hidden: true,
position: 4503599627370495,
parent: '<string>',
eyebrow: '<string>',
lede: '<string>',
cover: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
tabs: true,
translations: {}
})
};
fetch('http://localhost:3000/api/v1/brands/{slug}/pages/{page}', 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}/pages/{page}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'sections' => [
[
'id' => '<string>',
'title' => '<string>',
'body' => '<string>',
'columns' => 2,
'hidden' => true,
'keys' => [
'<string>'
],
'eyebrow' => '<string>',
'lede' => '<string>',
'aside' => '<string>',
'tab' => '<string>',
'background' => [
'color' => '<string>',
'image' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'scrim' => 0.45
],
'items' => [
[
'key' => '<string>',
'asset' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'title' => '<string>',
'text' => '<string>',
'caption' => '<string>',
'link' => '<string>',
'label' => '<string>',
'icon' => '<string>',
'download' => true,
'span' => 1,
'at' => [
50,
50
],
'level' => 1
]
],
'contexts' => [
'<string>'
],
'only' => '<string>',
'translations' => [
],
'props' => [
'image' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'video' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'strip' => true,
'flip' => true,
'show' => [
],
'matrix' => true,
'ase' => true,
'simulate' => true,
'sample' => '<string>',
'roles' => true,
'glyphs' => true,
'embed' => true,
'kit' => true,
'ask' => true,
'collection' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'search' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'query' => '<string>',
'limit' => 100,
'downloads' => true,
'from' => '<string>',
'depth' => 2,
'positions' => [
],
'partner' => '<string>',
'asset' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'scales' => [
5.05
],
'form' => [
[
'name' => '<string>',
'label' => '<string>'
]
],
'template' => '<string>',
'url' => '<string>',
'prompt' => '<string>'
]
]
],
'hidden' => true,
'position' => 4503599627370495,
'parent' => '<string>',
'eyebrow' => '<string>',
'lede' => '<string>',
'cover' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'tabs' => true,
'translations' => [
]
]),
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}/pages/{page}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"sections\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"columns\": 2,\n \"hidden\": true,\n \"keys\": [\n \"<string>\"\n ],\n \"eyebrow\": \"<string>\",\n \"lede\": \"<string>\",\n \"aside\": \"<string>\",\n \"tab\": \"<string>\",\n \"background\": {\n \"color\": \"<string>\",\n \"image\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scrim\": 0.45\n },\n \"items\": [\n {\n \"key\": \"<string>\",\n \"asset\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"text\": \"<string>\",\n \"caption\": \"<string>\",\n \"link\": \"<string>\",\n \"label\": \"<string>\",\n \"icon\": \"<string>\",\n \"download\": true,\n \"span\": 1,\n \"at\": [\n 50,\n 50\n ],\n \"level\": 1\n }\n ],\n \"contexts\": [\n \"<string>\"\n ],\n \"only\": \"<string>\",\n \"translations\": {},\n \"props\": {\n \"image\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"video\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"strip\": true,\n \"flip\": true,\n \"show\": [],\n \"matrix\": true,\n \"ase\": true,\n \"simulate\": true,\n \"sample\": \"<string>\",\n \"roles\": true,\n \"glyphs\": true,\n \"embed\": true,\n \"kit\": true,\n \"ask\": true,\n \"collection\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"search\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"query\": \"<string>\",\n \"limit\": 100,\n \"downloads\": true,\n \"from\": \"<string>\",\n \"depth\": 2,\n \"positions\": [],\n \"partner\": \"<string>\",\n \"asset\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scales\": [\n 5.05\n ],\n \"form\": [\n {\n \"name\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"template\": \"<string>\",\n \"url\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n }\n ],\n \"hidden\": true,\n \"position\": 4503599627370495,\n \"parent\": \"<string>\",\n \"eyebrow\": \"<string>\",\n \"lede\": \"<string>\",\n \"cover\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tabs\": true,\n \"translations\": {}\n}")
req, _ := http.NewRequest("PUT", 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.put("http://localhost:3000/api/v1/brands/{slug}/pages/{page}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"sections\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"columns\": 2,\n \"hidden\": true,\n \"keys\": [\n \"<string>\"\n ],\n \"eyebrow\": \"<string>\",\n \"lede\": \"<string>\",\n \"aside\": \"<string>\",\n \"tab\": \"<string>\",\n \"background\": {\n \"color\": \"<string>\",\n \"image\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scrim\": 0.45\n },\n \"items\": [\n {\n \"key\": \"<string>\",\n \"asset\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"text\": \"<string>\",\n \"caption\": \"<string>\",\n \"link\": \"<string>\",\n \"label\": \"<string>\",\n \"icon\": \"<string>\",\n \"download\": true,\n \"span\": 1,\n \"at\": [\n 50,\n 50\n ],\n \"level\": 1\n }\n ],\n \"contexts\": [\n \"<string>\"\n ],\n \"only\": \"<string>\",\n \"translations\": {},\n \"props\": {\n \"image\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"video\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"strip\": true,\n \"flip\": true,\n \"show\": [],\n \"matrix\": true,\n \"ase\": true,\n \"simulate\": true,\n \"sample\": \"<string>\",\n \"roles\": true,\n \"glyphs\": true,\n \"embed\": true,\n \"kit\": true,\n \"ask\": true,\n \"collection\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"search\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"query\": \"<string>\",\n \"limit\": 100,\n \"downloads\": true,\n \"from\": \"<string>\",\n \"depth\": 2,\n \"positions\": [],\n \"partner\": \"<string>\",\n \"asset\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scales\": [\n 5.05\n ],\n \"form\": [\n {\n \"name\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"template\": \"<string>\",\n \"url\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n }\n ],\n \"hidden\": true,\n \"position\": 4503599627370495,\n \"parent\": \"<string>\",\n \"eyebrow\": \"<string>\",\n \"lede\": \"<string>\",\n \"cover\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tabs\": true,\n \"translations\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/brands/{slug}/pages/{page}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"sections\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"columns\": 2,\n \"hidden\": true,\n \"keys\": [\n \"<string>\"\n ],\n \"eyebrow\": \"<string>\",\n \"lede\": \"<string>\",\n \"aside\": \"<string>\",\n \"tab\": \"<string>\",\n \"background\": {\n \"color\": \"<string>\",\n \"image\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scrim\": 0.45\n },\n \"items\": [\n {\n \"key\": \"<string>\",\n \"asset\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"text\": \"<string>\",\n \"caption\": \"<string>\",\n \"link\": \"<string>\",\n \"label\": \"<string>\",\n \"icon\": \"<string>\",\n \"download\": true,\n \"span\": 1,\n \"at\": [\n 50,\n 50\n ],\n \"level\": 1\n }\n ],\n \"contexts\": [\n \"<string>\"\n ],\n \"only\": \"<string>\",\n \"translations\": {},\n \"props\": {\n \"image\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"video\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"strip\": true,\n \"flip\": true,\n \"show\": [],\n \"matrix\": true,\n \"ase\": true,\n \"simulate\": true,\n \"sample\": \"<string>\",\n \"roles\": true,\n \"glyphs\": true,\n \"embed\": true,\n \"kit\": true,\n \"ask\": true,\n \"collection\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"search\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"query\": \"<string>\",\n \"limit\": 100,\n \"downloads\": true,\n \"from\": \"<string>\",\n \"depth\": 2,\n \"positions\": [],\n \"partner\": \"<string>\",\n \"asset\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scales\": [\n 5.05\n ],\n \"form\": [\n {\n \"name\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"template\": \"<string>\",\n \"url\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n }\n ],\n \"hidden\": true,\n \"position\": 4503599627370495,\n \"parent\": \"<string>\",\n \"eyebrow\": \"<string>\",\n \"lede\": \"<string>\",\n \"cover\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tabs\": true,\n \"translations\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"brand": "<string>",
"created": true,
"page": {
"slug": "<string>",
"title": "<string>",
"position": 0,
"hidden": true,
"parent": "<string>",
"eyebrow": "<string>",
"lede": "<string>",
"cover": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"icon": "<string>",
"audience": "everyone",
"tabs": true,
"aliases": [
"<string>"
],
"layout": "book",
"updatedAt": "2023-11-07T05:31:56Z",
"sections": [
{
"id": "<string>",
"template": "<string>",
"title": "<string>",
"body": "<string>",
"width": "text",
"columns": 0,
"tone": "<string>",
"hidden": true,
"keys": [
"<string>"
],
"props": {},
"eyebrow": "<string>",
"lede": "<string>",
"aside": "<string>",
"tab": "<string>",
"background": {
"color": "<string>",
"image": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scrim": 123
},
"items": [
{
"key": "<string>",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"text": "<string>",
"verdict": "do",
"caption": "<string>",
"link": "<string>",
"label": "<string>",
"icon": "<string>",
"download": true
}
],
"audience": "everyone",
"contexts": [
"<string>"
],
"only": "<string>",
"translations": {}
}
],
"translations": {}
},
"warnings": [
"<string>"
],
"url": "<string>"
}
}{
"data": {
"brand": "<string>",
"created": true,
"page": {
"slug": "<string>",
"title": "<string>",
"position": 0,
"hidden": true,
"parent": "<string>",
"eyebrow": "<string>",
"lede": "<string>",
"cover": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"icon": "<string>",
"audience": "everyone",
"tabs": true,
"aliases": [
"<string>"
],
"layout": "book",
"updatedAt": "2023-11-07T05:31:56Z",
"sections": [
{
"id": "<string>",
"template": "<string>",
"title": "<string>",
"body": "<string>",
"width": "text",
"columns": 0,
"tone": "<string>",
"hidden": true,
"keys": [
"<string>"
],
"props": {},
"eyebrow": "<string>",
"lede": "<string>",
"aside": "<string>",
"tab": "<string>",
"background": {
"color": "<string>",
"image": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scrim": 123
},
"items": [
{
"key": "<string>",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"text": "<string>",
"verdict": "do",
"caption": "<string>",
"link": "<string>",
"label": "<string>",
"icon": "<string>",
"download": true
}
],
"audience": "everyone",
"contexts": [
"<string>"
],
"only": "<string>",
"translations": {}
}
],
"translations": {}
},
"warnings": [
"<string>"
],
"url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"detail": "<unknown>"
}
}Authorizations
An API key: ab_...
Body
1 - 120The whole page, top to bottom
60Show child attributes
Show child attributes
Kept, but not published
Where among the brand's pages, from 0; the end for a new page
0 <= x <= 9007199254740991Its parent page; null for the top. Three levels at most
60^[a-z0-9]+(-[a-z0-9]+)*$1201000Its header and card image
^([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)$folder, photo, palette, brush, camera, movie, music, star, heart, flag, bookmark, briefcase, building-store, speakerphone, rocket, sparkles, leaf, world, users, archive On portals: who may read it
everyone, partners, members Its child pages as tabs across its top
landing: no nav column, on-this-page or pager, for a home or campaign page; book when left out
book, landing Its words by language tag
Show child attributes
Show child attributes
Response
Replaced
Show child attributes
Show child attributes