Brands

Create a brand

Creates a brand. The CSS must parse as a brand theme; a rejected theme answers 422 with located findings under fields.css. With isDefault, the new brand becomes the default. An organization holds at most 12 brands; creating one more answers 409 with a ConflictError.

post/v1/brands

Request

  • Base URL: https://api.samva.dev
  • URL: https://api.samva.dev/v1/brands
  • Auth: API key in header x-api-key

Request body

slugstring required
namestring required
cssstring nullable
isDefaultboolean nullable

Response

Success

idstring required
slugstring required

The brand's handle, unique in the organization; samva:brand/<slug> names it.

namestring required
isDefaultboolean required

Whether bare samva:brand and domains without a brand resolve to this brand.

cssstring required

Brand theme CSS: @theme variables, one dark-mode @theme of colors, and @font-face rules with https WOFF2 sources.

digeststring required

SHA-256 of the brand's css, assets and footer. A publication built against a different digest predates the brand's current content.

createdAtstring required
updatedAtstring required

Changes

No recorded changes to this operation across all 1 revision of this API.