Rename a brand, or make it the default
PATCH
/api/v1/brands/{slug}
const url = 'http://localhost:3000/api/v1/brands/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","slug":"example","default":true,"domain":"example","private":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:3000/api/v1/brands/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "slug": "example", "default": true, "domain": "example", "private": true }'Scope: write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”slug
required
string
Brand slug
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”The brand
Media typeapplication/json
object
data
required
object
id
required
string format: uuid
slug
required
string
name
required
string
default
required
boolean
private
required
Only grants on it, and admins, reach it in the app
boolean
visibility
required
Who sees it on BrandHub
string
from
The BrandHub brand it started from, as {org}/{brand}@{n}
string | null
domain
Its own domain (acme.com): whoever proves it may claim its BrandHub listing
string | null
movedTo
Claimed on BrandHub by whoever proved its domain: the listing that took its place, as {org}/{brand}
string | null
createdAt
required
string format: date-time
Example
{ "data": { "visibility": "private" }}default
Section titled “default”An error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}