api.brand

create()

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

Legt eine Marke an. Nur der Name ist Pflicht; alles andere kann später folgen, Block für 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

Der Name der Marke.

descriptionstring

Ein Satz, höchstens 500 Zeichen. Die ausführliche Beschreibung gehört in identity.longDescription.

logosarray

{ name, content } oder { path }, mit optionaler role (primary, secondary, icon, monogram, other) und main. Höchstens 12, je 5 MB; SVG, PNG, JPEG oder WebP, erkannt an den Bytes, nie am Namen.

palettearray | object

Eine Farbliste ("#6B3E26" oder { hex, role, name }) oder { colors, typography }. Ohne sie werden die Farben aus dem Hauptlogo gewonnen.

identityobject

Slogan, ausführliche Beschreibung, Branche, Sprachen, Gründungsjahr, Domain, soziale Netzwerke.

platformobject

Mission, Vision, Werte, Positionierung, Versprechen, Zielgruppen, Archetyp, Tonalität, Botschaften.

assetsarray

Fotos, Videos oder Illustrationen — siehe assets.

Eine abgelehnte Ressource bricht die Marke nicht ab

Zuerst wird die Marke angelegt, dann ihre Ressourcen. Eine fehlgeschlagene steht in brand.assetErrors — mit Index, Code und Meldung —, die übrigen bleiben erhalten.

Fehler

CodeStatusWann
invalid_name400Kein Name oder ein leerer Name.
invalid_field400Ein unbekanntes Feld von identity oder platform oder ein Wert vom falschen Typ.
unsupported_logo400Die Bytes sind kein SVG-, PNG-, JPEG- oder WebP-Bild.
unsafe_svg400Das SVG enthält ein Skript, einen Event-Handler, eingebettetes HTML oder einen externen Link.
too_many_logos400Mehr als 12 Logos.
logo_too_large413Ein Logo über 5 MB.
invalid_color400Eine Farbe, die kein Hex-Wert ist, oder eine unbekannte Rolle.
too_many_brands403Das Konto hat bereits 50 Marken.