Skip to content

Lay out pages from the rules

POST
/api/v1/brands/{slug}/pages
curl --request POST \
--url http://localhost:3000/api/v1/brands/example/pages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "set": { "topic": "example", "parent": "example" } }'

For a brand with no pages: an overview, then a page per group of rules, each in the templates it fits. A start to edit from; 409 when the brand has pages. With set, one topic’s pages (Our X, Using X, In product, In marketing, Best practices, Showcase) go in beside the pages there are, under parent; 409 only when one of their slugs is taken.

Scope: write.

slug
required
string

Brand slug

Media typeapplication/json
object
set

Six pages on one topic under parent, beside pages that exist

object
topic
required

E.g. logo

string
>= 1 characters <= 40 characters
parent

The page they go under; a new page named for the topic when left out

string
<= 60 characters /^[a-z0-9]+(-[a-z0-9]+)*$/
Examplegenerated
{
"set": {
"topic": "example",
"parent": "example"
}
}

The pages made

Media typeapplication/json
object
data
required
object
brand
required
string
pages
required
Array<object>
object
slug
required
string
title
required
string
sections
required
integer
>= -9007199254740991 <= 9007199254740991
Examplegenerated
{
"data": {
"brand": "example",
"pages": [
{
"slug": "example",
"title": "example",
"sections": 1
}
]
}
}

An error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": "example"
}
}