Skip to content

Publish a brand

POST
/api/v1/brands/{slug}/publish
curl --request POST \
--url http://localhost:3000/api/v1/brands/example/publish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "note": "example", "image": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Its latest version, rules, pages and theme, becomes the published one, and the next edit starts a new version. note says what changed, for readers, with image beside it. With nothing changed since the last publish, it answers unchanged: true and publishes nothing. Takes share on the project.

Scope: write.

slug
required
string

Brand slug

Media typeapplication/json
object
note

What changed, for readers of the history and What’s new

string
<= 2000 characters
image

An asset shown beside the note

string format: uuid
/^([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)$/
Examplegenerated
{
"note": "example",
"image": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

The published version

Media typeapplication/json
object
data
required
object
number
required
integer
>= -9007199254740991 <= 9007199254740991
kind
required
string
Allowed values: baseline edit restore
name
required
string | null
actor
required

Who: a person’s name, an API key’s name, or “web” for the app without an account

string
changed
required

Keys touched; a page as page:{slug}, and theme

Array<string>
restoredFrom
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
summary
required
string
rules
required
integer
>= -9007199254740991 <= 9007199254740991
pages
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
publishedAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
publishedBy
required
string | null
note
required

What changed, for readers, given when it was published

string | null
noteImage
required
Any of:
string format: uuid
/^([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)$/
createdAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
updatedAt
required

Edits close together extend a version; this is its last

string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
brand
required
string
unchanged
required

Nothing changed since the last publish, which stands

boolean
portals

The portals showing it, where visitors now read it

Array<object>
object
slug
required
string
name
required
string
access
required
string
Allowed values: public password members
url
required
string format: uri
hub
required
Any of:
object
visibility
required
string
Allowed values: private public
url
required
string format: uri
Example
{
"data": {
"kind": "baseline",
"portals": [
{
"access": "public"
}
],
"hub": {
"visibility": "private"
}
}
}

An error

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