# create()

Canonical URL: https://developers.iagenify.com/de/sdk/ref/brand/create/
Language: de

`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.

Status: POST /api/brand · free · colors from the logo

```javascript
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" }],
});
```

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `name` | string | required | Der Name der Marke. |
| `description` | string |  | Ein Satz, höchstens 500 Zeichen. Die ausführliche Beschreibung gehört in `identity.longDescription`. |
| `logos` | array |  | `{ 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. |
| `palette` | array | object |  | Eine Farbliste (`"#6B3E26"` oder `{ hex, role, name }`) oder `{ colors, typography }`. Ohne sie werden die Farben aus dem Hauptlogo gewonnen. |
| `identity` | object |  | Slogan, ausführliche Beschreibung, Branche, Sprachen, Gründungsjahr, Domain, soziale Netzwerke. |
| `platform` | object |  | Mission, Vision, Werte, Positionierung, Versprechen, Zielgruppen, Archetyp, Tonalität, Botschaften. |
| `assets` | array |  | Fotos, Videos oder Illustrationen — siehe [assets](/de/sdk/ref/brand-object/assets). |

## Eine abgelehnte Ressource bricht die Marke nicht ab {#assets}

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

## Fehler {#errors}

| Code | Status | Wann |
| --- | --- | --- |
| invalid_name | 400 | Kein Name oder ein leerer Name. |
| invalid_field | 400 | Ein unbekanntes Feld von identity oder platform oder ein Wert vom falschen Typ. |
| unsupported_logo | 400 | Die Bytes sind kein SVG-, PNG-, JPEG- oder WebP-Bild. |
| unsafe_svg | 400 | Das SVG enthält ein Skript, einen Event-Handler, eingebettetes HTML oder einen externen Link. |
| too_many_logos | 400 | Mehr als 12 Logos. |
| logo_too_large | 413 | Ein Logo über 5 MB. |
| invalid_color | 400 | Eine Farbe, die kein Hex-Wert ist, oder eine unbekannte Rolle. |
| too_many_brands | 403 | Das Konto hat bereits 50 Marken. |

- [Brand](/de/sdk/ref/brand-object): Was eine Marke enthält und wie man sie ändert.
- [logos](/de/sdk/ref/brand-object/logos): Ein Logo hinzufügen, das Hauptlogo wählen.
- [palette](/de/sdk/ref/brand-object/palette): Farben, Rollen und Typografie.

```python
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"}]
```
