# Upload a brand asset

`POST https://api.parasend.com/v1/brand_assets`

Source: https://parasend.com/docs/api/brand-assets/upload

Authentication: `Authorization: Bearer <API key>` (a `ps_test_` key in test mode, `ps_live_` in live mode).
Send an `Idempotency-Key` header: a retry with the same key returns the first answer.

Uploads a logo, a page photo or a tab icon; the image is the request body. Needs `brand_profiles.create`.

**Logo** (the default): PNG or SVG, at most 1 MB (413 `logo_too_large`), drawn into a PNG that fits 200 × 48 CSS pixels at 3×, with no metadata. A file that is not what its type says is 415 `logo_type_unsupported`; an unsafe SVG is 400 `logo_svg_unsafe`. The same picture again answers 200 with the logo you already have.

**Photo** (`kind=image`): JPEG, PNG or WebP, at most 5 MB (413 `image_too_large`) and at least 640 × 320 pixels (400 `image_too_small`). It is turned the right way up and drawn into two WebP renditions, at most 1600 and 800 pixels wide, with no metadata; the upload itself is not kept.

**Icon** (`kind=icon`): a square PNG of at least 180 × 180 pixels (400 `icon_too_small`) or a square SVG, at most 1 MB (413 `icon_too_large`), drawn into 180 and 32 pixel PNGs.

## Query parameters

- `kind` (string, optional): One of: `logo`, `image`, `icon`. Default: `"logo"`.

## Body (image/png)

The request body is the file itself (image/png, image/svg+xml, image/jpeg, image/webp).


## Example: Upload a PNG logo

```bash
curl -X POST "https://api.parasend.com/v1/brand_assets" \
  -H "Authorization: Bearer $PARASEND_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: image/png" \
  --data-binary @logo.png
```

```js
import { readFile } from 'node:fs/promises';

const res = await fetch('https://api.parasend.com/v1/brand_assets', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.PARASEND_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'image/png',
  },
  body: await readFile('logo.png'),
});
const data = await res.json();
```

## Response 200

The organisation already had this logo.

Content type: application/json.

## Response 201

Uploaded.

```json
{
  "id": "bas_01M6R27T7R9RDBHE6X72ZRW3YC",
  "object": "brand_asset",
  "kind": "logo",
  "content_type": "image/png",
  "source_type": "image/png",
  "sha256": "f72bdd36e6ce104c53c8f21bd9e618e113a66f4d6729d43a4cb07b3f1373addb",
  "width": 200,
  "height": 48,
  "url": "/v1/brand_assets/bas_01M6R27T7R9RDBHE6X72ZRW3YC/content",
  "transparent_background": false,
  "created_at": "2026-11-06T09:15:05.848Z"
}
```

Errors: one shape, `{"error": {type, code, message, param, request_id}}`; every code is listed at https://parasend.com/docs/errors.
