Zum Inhalt springen
Zum Brandhub

Seite anlegen

POST
/pages
curl --request POST \
--url https://ihre-marke.brandhub.31m.de/api/v1/pages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "title": "example", "slug": "example", "parent_id": 1, "nav_expansion": "collapsible", "type": "guideline", "blocks": [ { "type": "example", "data": { "additionalProperty": "example" } } ] }'

Legt eine Seite an, optional mit bis zu 200 Start-Blöcken. Ohne slug bildet Brandhub ihn aus dem Titel. Ein Kapitel (type: container) gruppiert nur und trägt keine Blöcke.

Media typeapplication/json
object
title
required
string
<= 255 characters
slug
string | null
<= 255 characters
parent_id
integer | null
nav_expansion
string | null
Allowed values: collapsible pinned_open
type

Inhaltsseite (guideline, Standard) oder Navigationskapitel (container).

string | null
Allowed values: guideline container
blocks

Start-Blöcke, je ein Objekt mit type und data.

Array<object> | null
object
type
required
string
data
object
key
additional properties

Page

Media typeapplication/json
Page
object
id
required
integer
title
required
string
slug
required
string
type
required
string
parent_id
required
integer | null
nav_expansion
required
string
visibility
required
string
blocks
required
Array<object>
object
id
required
string | null
type
required
string | null
data
required
object
key
additional properties
updated_at
required
string | null
Examplegenerated
{
"id": 1,
"title": "example",
"slug": "example",
"type": "example",
"parent_id": 1,
"nav_expansion": "example",
"visibility": "example",
"blocks": [
{
"id": "example",
"type": "example",
"data": {
"additionalProperty": "example"
}
}
],
"updated_at": "example"
}

Validation error

Media typeapplication/json
object
message
required

Errors overview.

string
errors
required

A detailed description of each field that failed validation.

object
key
additional properties
Array<string>
Examplegenerated
{
"message": "example",
"errors": {
"additionalProperty": [
"example"
]
}
}