# create()

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

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

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 | The brand's name. |
| `description` | string |  | One sentence, 500 characters at most. The long description belongs in `identity.longDescription`. |
| `logos` | array |  | `{ 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. |
| `palette` | array | object |  | A list of colors (`"#6B3E26"` or `{ hex, role, name }`), or `{ colors, typography }`. Without it, colors are extracted from the main logo. |
| `identity` | object |  | Tagline, long description, sector, languages, founding year, domain, socials. |
| `platform` | object |  | Mission, vision, values, positioning, promise, audiences, archetype, voice, messages. |
| `assets` | array |  | Photos, videos or illustrations — see [assets](/sdk/ref/brand-object/assets). |

## A refused resource does not cancel the brand {#assets}

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 {#errors}

| Code | Status | When |
| --- | --- | --- |
| invalid_name | 400 | No name, or an empty one. |
| invalid_field | 400 | An unknown field of identity or platform, or a value of the wrong type. |
| unsupported_logo | 400 | The bytes are not an SVG, PNG, JPEG or WebP image. |
| unsafe_svg | 400 | The SVG carries a script, an event handler, embedded HTML or an external link. |
| too_many_logos | 400 | More than 12 logos. |
| logo_too_large | 413 | A logo above 5 MB. |
| invalid_color | 400 | A color that is not a hex value, or an unknown role. |
| too_many_brands | 403 | The account already has 50 brands. |

- [Brand](/sdk/ref/brand-object): What a brand carries, and how to change it.
- [logos](/sdk/ref/brand-object/logos): Adding a logo, choosing the main one.
- [palette](/sdk/ref/brand-object/palette): Colors, roles and typography.

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