api.brand

create()

api.brand.create({ name, description?, logos?, palette?, identity?, platform?, assets? }) → Promise<Brand>

Creates a brand. Only the name is required; everything else can come later, block by block.

POST /api/brandfreecolors from the logo
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

const brand = await api.brand.create({
  name: "Qahwa Lab",
  description: "Specialty coffee roasted in Tunis",
  logos: [
    { name: "logo.svg", content: svgText, main: true },   // SVG text, bytes, a Blob or base64
    { path: "./icon.png", role: "icon" },                // Node.js only
  ],
  palette: ["#6B3E26", "#D9A441"],                        // optional
  identity: { tagline: "Roasted every morning" },
  assets: [{ cloud: "Brand/storefront.jpg", role: "hero" }],
});
brand = api.brand.create(
    name="Qahwa Lab",
    description="Specialty coffee roasted in Tunis",
    logos=[
        {"name": "logo.svg", "content": svg_text, "main": True},   # SVG text, bytes or base64
        {"path": "icon.png", "role": "icon"},
    ],
    palette=["#6B3E26", "#D9A441"],                              # optional
    identity={"tagline": "Roasted every morning"},
    assets=[{"cloud": "Brand/storefront.jpg", "role": "hero"}],
)
brand.asset_errors   # None, or [{"index", "code", "message"}]
namestringrequired

The brand's name.

descriptionstring

One sentence, 500 characters at most. The long description belongs in identity.longDescription.

logosarray

{ name, content } or { path }, with an optional role (primary, secondary, icon, monogram, other) and main. 12 at most, 5 MB each; SVG, PNG, JPEG or WebP, read from the bytes, never from the name.

palettearray | object

A list of colors ("#6B3E26" or { hex, role, name }), or { colors, typography }. Without it, colors are extracted from the main logo.

identityobject

Tagline, long description, sector, languages, founding year, domain, socials.

platformobject

Mission, vision, values, positioning, promise, audiences, archetype, voice, messages.

assetsarray

Photos, videos or illustrations — see assets.

A refused resource does not cancel the brand

The brand is created first, then its resources. One that fails is listed in brand.assetErrors — its index, code and message — and the others are kept.

Errors

CodeStatusWhen
invalid_name400No name, or an empty one.
invalid_field400An unknown field of identity or platform, or a value of the wrong type.
unsupported_logo400The bytes are not an SVG, PNG, JPEG or WebP image.
unsafe_svg400The SVG carries a script, an event handler, embedded HTML or an external link.
too_many_logos400More than 12 logos.
logo_too_large413A logo above 5 MB.
invalid_color400A color that is not a hex value, or an unknown role.
too_many_brands403The account already has 50 brands.