Zum Inhalt springen
Zum Brandhub

Inhalt ersetzen

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

Ersetzt den gesamten Inhalt einer Seite durch bis zu 200 Blöcke. Ändern Sie einzelne Blöcke lieber über ihre ID, dieser Aufruf ist für Fälle gedacht, in denen das nicht reicht.

page
required
integer

ID der Seite.

Media typeapplication/json
object
blocks
required

Die neuen Blöcke, je ein Objekt mit type und data.

Array<object>
object
type
required
string
data
object
key
additional properties
Examplegenerated
{
"blocks": [
{
"type": "example",
"data": {
"additionalProperty": "example"
}
}
]
}

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"
]
}
}