---
title: "Upload a brand image"
description: "Uploads one brand image, replacing the one there was, and returns the brand. The body is the image itself, not JSON."
url: "https://openemail.uk/docs/api/branding/upload-image"
area: "API"
category: "Mailbox"
---

# Upload a brand image

Uploads one brand image, replacing the one there was, and returns the brand. The body is the image itself, not JSON.

`PUT /branding/images/{variant}`

## PUT /branding/images/{variant}

Uploads one brand image, replacing the one there was, and returns the brand. The body is the image itself, not JSON.

## The four images

| variant | What it is | Formats | Stored as |
| --- | --- | --- | --- |
| `mark` | The square icon | SVG, PNG, JPEG, WebP | WebP, 512 by 512 at most |
| `wordmark` | The logo | SVG, PNG, JPEG, WebP | WebP, 1024 by 256 at most |
| `wordmark-dark` | The logo for dark mode | SVG, PNG, JPEG, WebP | WebP, 1024 by 256 at most |
| `login-background` | The photo behind the sign-in page | PNG, JPEG, WebP, GIF | WebP, 2560 by 1600 at most |

Send the bytes with their type in `Content-Type`. Up to 5 MB goes in. An SVG is turned into a picture, and an animated image keeps its first frame.

## Example

Needs `settings:write` and a key with no address or domain restriction.

**curl**

```
curl -X PUT "$OE/branding/images/login-background" -H "$AUTH" \
  -H "Content-Type: image/jpeg" --data-binary @lobby.jpg
```

**Response**

```
{
  "object": "branding",
  "editable": true,
  "images": {
    "mark": "https://cdn-prod.openemail.uk/workspaces/icons/0199a1c2-7d4e-7a31-9b52-3c8e1f0a6d24.webp",
    "wordmark": "https://cdn-prod.openemail.uk/workspaces/wordmarks/0199a1c2-8b10-7e45-a2f1-6d9c3b7e0f58.webp",
    "wordmarkDark": null,
    "loginBackground": "https://cdn-prod.openemail.uk/workspaces/login-backgrounds/0199a1c3-0f2e-7c61-8d4a-5b1e9f7a2c36.webp"
  },
  "fonts": {
    "primary": "inter",
    "secondary": "georgia"
  },
  "loginBackground": {
    "kind": "image",
    "preset": "dusk",
    "color": null
  }
}
```

> Uploading the sign-in photo also switches the sign-in page to it.

> An image of a type that variant does not take, or one that cannot be read, answers `422` `invalid_image`. A busy image service answers `503` `image_busy`, and a failed save `502` `image_not_stored`, so try again.
