# Branding API

## GET /api/v1/admin/branding/public

`GET /api/v1/admin/branding/public` · operation `publicConsoleBranding`

Presentation-only branding for the login screen and console, readable before login. Requires ui (404 otherwise). With console_branding off it answers 200 with an empty product_name, the default presentation, so the console's pre-login probe is never a failed request. Never contains inventory, identity or source details.

**Authentication:** None.

**Responses**

| Status | Description | Body |
|---|---|---|
| `200` | Branding | `application/json`: [Branding](/docs/api/schemas/b/#branding) |
| `404` | Feature disabled | `application/json`: [Error](/docs/api/schemas/e/#error) |


## GET /api/v1/admin/branding

`GET /api/v1/admin/branding` · operation `getConsoleBranding`

Effective branding, its source (default, yaml or console) and the control version. Requires console_branding, branding_management and branding:manage (global admin).

**Authentication:** `adminSession`

**Responses**

| Status | Description | Body |
|---|---|---|
| `200` | Effective branding | `application/json`: object |
| `401` | Missing or invalid bearer key | `application/json`: [Error](/docs/api/schemas/e/#error) |
| `403` | Model not allowed | `application/json`: [Error](/docs/api/schemas/e/#error) |
| `404` | Feature disabled | `application/json`: [Error](/docs/api/schemas/e/#error) |

Response `200` fields:

- `application/json`: object
  - `version` (integer (int64), required)
  - `branding` ([Branding](/docs/api/schemas/b/#branding), required)
  - `source` (string, required, one of `"default"`, `"yaml"`, `"console"`)
  - `declared` (boolean)
  - `logo_max_bytes` (integer)


## PUT /api/v1/admin/branding

`PUT /api/v1/admin/branding` · operation `setConsoleBranding`

Store a versioned, audited console override. Field names are exact; nulls and unknown fields are rejected. accent_color must keep 4.5:1 contrast with the console's dark text; the logo must be a PNG data URI up to 48 KiB and 256x256 (SVG is rejected). Body limit 96 KiB.

**Authentication:** `adminSession`

**Parameters**

| Name | In | Type | Description |
|---|---|---|---|
| `X-CSRF-Token` | header | string, required | Token returned by admin login/session; required with the same-origin session cookie for writes. |

**Request body** (required)

- `application/json`: object
  - `version` (integer (int64), required)
  - `branding` ([Branding](/docs/api/schemas/b/#branding), required)

**Responses**

| Status | Description | Body |
|---|---|---|
| `200` | Saved; effective branding, source and new version | — |
| `400` | Invalid input | `application/json`: [Error](/docs/api/schemas/e/#error) |
| `403` | Model not allowed | `application/json`: [Error](/docs/api/schemas/e/#error) |
| `404` | Feature disabled | `application/json`: [Error](/docs/api/schemas/e/#error) |
| `409` | Configuration version conflict | — |
| `422` | Invalid branding (name, contrast, logo or support URL) | — |


## DELETE /api/v1/admin/branding

`DELETE /api/v1/admin/branding` · operation `revertConsoleBranding`

Remove the console override and return to the YAML base or the default.

**Authentication:** `adminSession`

**Parameters**

| Name | In | Type | Description |
|---|---|---|---|
| `X-CSRF-Token` | header | string, required | Token returned by admin login/session; required with the same-origin session cookie for writes. |

**Request body** (required)

- `application/json`: object
  - `version` (integer (int64), required)

**Responses**

| Status | Description | Body |
|---|---|---|
| `200` | Reverted; effective branding, source and new version | — |
| `403` | Model not allowed | `application/json`: [Error](/docs/api/schemas/e/#error) |
| `404` | No console override, or feature disabled | — |
| `409` | Configuration version conflict | — |

