Get a brand
Returns one brand by its slug. Request: GET /v1/brands/{slug}. Scope: templates:read.
GET
Returns one brand by its slug.
apiKeyheader
x-api-key<token>slug*stringMatch
^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$Brand
application/json- response
id*BrandIdMatch
^brand_[0-9a-hjkmnp-tv-z]{16,24}$slug*stringThe brand's handle, unique in the organization; samva:brand/<slug> names it.
Match
^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$name*stringisDefault*booleanWhether bare samva:brand and domains without a brand resolve to this brand.
css*stringBrand theme CSS: @theme variables, one dark-mode @theme of colors, and @font-face rules with https WOFF2 sources.
assets*footer*digest*stringSHA-256 of the brand's css, assets and footer. A publication built against a different digest predates the brand's current content.
createdAt*stringupdatedAt*stringimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.brands.get({
"slug": "example"
});Example Response
{
"id": "string",
"slug": "string",
"name": "string",
"isDefault": true,
"css": "string",
"assets": {
"logoUrl": "string",
"logoDarkUrl": "string",
"iconUrl": "string"
},
"footer": {
"companyName": "string",
"websiteUrl": "string",
"address": {
"street1": "string",
"street2": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"country": "string"
},
"socialLinks": [
{
"label": "string",
"url": "string"
}
]
},
"digest": "string",
"createdAt": "string",
"updatedAt": "string"
}