---
title: "Set the workspace image"
description: "Replace the workspace image (its avatar in the dashboard, and the email logo when there's no brand logo), from a public https url or base64 data (PNG, JPEG, GIF or WebP, up to 5 MB and 16,384 px a side). `PUT /api/v1/workspace/image`"
url: https://www.unitpost.com/docs/platform/put-workspace-image
section: "Platform API reference"
updated: 2026-10-13
---
# Set the workspace image

`PUT /api/v1/workspace/image`

Replace the workspace image (its avatar in the dashboard, and the email logo when there's no brand logo), from a public https `url` or base64 `data` (PNG, JPEG, GIF or WebP, up to 5 MB and 16,384 px a side). Requires the `branding:write` capability.

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | no | A public https image to fetch (no redirects, no private addresses). PNG, JPEG, GIF or WebP, up to 5 MB and 16,384 px a side (50 megapixels at most); anything else is a 422 naming `url`. |
| `data` | string | no | The image bytes, base64 (no `data:` prefix). Base64 adds a third, and a request over ~6 MB is refused before it arrives, so this fits about 4 MB of image; send larger images (up to 5 MB) by `url`. At most 16,384 px a side and 50 megapixels; anything else is a 422 naming `data`. |
| `content_type` | enum | no | Required with `data`; refused with `url` (the server sends the type). One of: `image/png`, `image/jpeg`, `image/gif`, `image/webp`. |
| `filename` | string | no | Shown in the library. Defaults to the URL's file name, or `image`. |

## Response fields (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | — |
| `id` | string | yes | — |
| `name` | string | yes | — |
| `slug` | string | yes | — |
| `image_url` | string \| null | yes | The workspace image (its avatar in the dashboard). |

## Responses

| Status | Description |
| --- | --- |
| 200 | The workspace. |
| 400 | The body isn't JSON. |
| 401 | Missing or invalid API key. |
| 403 | Insufficient scope. |
| 422 | Neither or both of `url` and `data`, an image that couldn't be fetched or read, the wrong type, over 5 MB, over 16,384 px a side or 50 megapixels, or an unknown key. |
| 429 | Too many uploads; retry after the wait. |
| 502 | Storing the image failed; nothing changed. Retry. |
| 503 | `engine_unavailable`: image hosting isn't configured on this deployment; nothing changed. |

## Example request

```bash
curl -X PUT 'https://www.unitpost.com/api/v1/workspace/image' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0' \
  -H 'Content-Type: application/json' \
  -d '{ }'
```

## Example response (200)

```json
{
  "object": "workspace",
  "id": "id_123",
  "name": "Example",
  "slug": "string",
  "image_url": "https://example.com"
}
```

## Links

- HTML reference (with Node.js, Python, Ruby, PHP, Laravel, Go, Java, Rust, .NET and CLI examples): https://www.unitpost.com/docs/platform/put-workspace-image
- OpenAPI 3.1 (full schemas): https://www.unitpost.com/api/v1/openapi.json
