Publish a brand
const url = 'http://localhost:3000/api/v1/brands/example/publish';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"note":"example","image":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Brand slug
Request Body
Section titled “Request Body”object
What changed, for readers of the history and What’s new
An asset shown beside the note
Examplegenerated
{ "note": "example", "image": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”The published version
object
object
Who: a person’s name, an API key’s name, or “web” for the app without an account
Keys touched; a page as page:{slug}, and theme
What changed, for readers, given when it was published
Edits close together extend a version; this is its last
Nothing changed since the last publish, which stands
The portals showing it, where visitors now read it
object
Example
{ "data": { "kind": "baseline", "portals": [ { "access": "public" } ], "hub": { "visibility": "private" } }}default
Section titled “default”An error
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}