# Upload a form logo or the workspace logo

Store a public picture as `{"purpose": "form"|"workspace", "data": <base64>}` — a PNG, JPEG, WebP or SVG up to 5MB and 4096 pixels a side. The bytes pass through the service: the type is read from them, their metadata is dropped and an SVG that could run script or load anything is refused (400 naming why). Answers 201 with the picture (`id`, `purpose`, `contentType`, `sizeBytes`, `width`, `height`) and its public `url`, served to anyone at /v1/public/workspace-logos/:id. Saving that url — into a form's `settings.branding.logoUrl`, or `setting:general.logo_url` — is a separate write. `form` is any seat's, as editing a form is; `workspace` is admin only. 503 with no file storage or no public base URL.

Access class: `workspace`.

## Endpoint

`POST /v1/workspace/pictures`

## Request body

Content type: `application/json`.

```json
{
  "data": "string",
  "purpose": "string"
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "contentType": "string",
    "createdAt": "2026-01-01T00:00:00Z",
    "height": 1,
    "id": "",
    "purpose": "string",
    "sizeBytes": 1,
    "width": 1
  },
  "url": "string"
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
