# Upload a page's logo

`PUT /api/v1/status-pages/{pageId}/logos/{variant}`

Uploads the logo of one theme (`light` or `dark`). The body is the file itself: PNG, WebP or SVG without scripts, event handlers or external references, at most 256 KiB; the type is read from the bytes. Needs the project admin role.

Sign-in: a dashboard session, an API token with `pages:write` or the `monitorly` CLI's sign-in with `pages:write`.

Section: Status pages. Operation id in openapi.json: `upload_status_page_logo`.

## Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `pageId` | path | yes | string (uuid) | The status page's id. |
| `variant` | path | yes | LogoVariant | The theme: `light` or `dark`. |

## Request body

Required: yes.

`application/octet-stream`: array of integer

## Responses

Errors are `application/problem+json` (`Problem`); branch on `type`.

### 200

The page with its new logo.

`application/json`: StatusPageView

| Field | Type | Required | Description |
|---|---|---|---|
| `accentColor` | string \| null | no | `#rrggbb`: the page's accent instead of the product's; white text on it has at least 4.5:1 contrast. |
| `access` | PageAccess | no | Who may open the published page. Always sent; optional in the schema because it was added after the first clients. |
| `components` | array of ComponentView | yes |  |
| `customDomain` | DomainView \| null | no |  |
| `emailSubscriberCount` | integer | no | Confirmed email subscribers. Always sent; optional in the schema. |
| `emailSubscriptions` | boolean | no | Visitors can subscribe by email (the installation sends email). Always sent; optional in the schema. |
| `hasPassword` | boolean | no | A page password is stored (it is never answered). Always sent; optional in the schema. |
| `hideBranding` | boolean | no | The page leaves out "Powered by Monitorly Cloud" (Business plan). Always sent; optional in the schema. |
| `id` | string (uuid) | yes |  |
| `logos` | LogosView | yes |  |
| `managedBy` | ManagedBy | no | `config` when a config apply manages the page, `ui` otherwise. Always sent; optional in the schema because it was added after the first clients. |
| `projectId` | string (uuid) | yes |  |
| `publicUrl` | string \| null | no | The page's public address (`<status host>/<slug>`), also while it is a draft (it answers 404 until the page is published); null when the installation has no status page address. |
| `published` | boolean | yes |  |
| `ref` | string \| null | no | The page's key in a config file; null until a config apply creates or adopts it. Always sent; optional in the schema because it was added after the first clients. |
| `slug` | string | yes |  |
| `subscribeUrl` | string \| null | no | `https://t.me/<bot>?start=sub_<code>`: the page's "Subscribe" link; null without a bot username. |
| `subscriberCount` | integer | yes | Telegram chats subscribed to the page's posts (active ones). |
| `theme` | PageTheme \| null | no |  |
| `title` | string | yes |  |
| `updatedAt` | string | yes |  |
| `websiteUrl` | string \| null | no | The company site the page header links to. |

### 400

Bad Request.

- `request.malformed`: the body or a parameter is not of the expected shape
- `auth.credentials_conflict`: the request carries both a session cookie and a token

### 401

Unauthorized.

- `auth.unauthenticated`, `auth.session_expired`: no session, or it ended
- `token.invalid`: the token is malformed, unknown, revoked or expired, or its creator left the workspace

### 403

Forbidden.

- `auth.forbidden`: your role is too low for this
- `token.scope_missing`: the token lacks the scope this needs; `detail` names it
- `request.origin_mismatch`, `request.header_required`: a changing request with a session comes from another site or lacks `X-Monitorly-Request: 1`

### 404

Not Found.

- `request.not_found`: it does not exist, or you cannot see it

### 413

Payload Too Large.

- `request.too_large`: the body is larger than 256 KiB
- `status_page.logo_too_large`: logo is larger than 256 KiB

### 415

Unsupported Media Type.

- `status_page.logo_type_unsupported`: logo is not PNG, WebP or SVG (by content, not by `Content-Type`)

### 422

Unprocessable Entity.

- `field.required`, `field.too_long`, `field.invalid`: a field breaks a rule; `errors` points at it
- `status_page.logo_unsafe`: SVG with a script, event handler, external reference, DOCTYPE or `foreignObject`

### 429

Too Many Requests.

- `token.rate_limited`: more than 10 requests a second with this token
- `session.rate_limited`: more than 5 changes a second from your sessions

Schemas named above are listed with their fields in [the schema list](https://docs.monitorly.cloud/api/reference/schemas.md).
