Skip to main content

Upload Branding Image

POST 

/api/admin/portal/branding/assets

Upload the portal logo or square mark (multipart/form-data). Replaces the current image of that type; the old uploaded file is deleted once the new one is saved.

Not yet available to API tokens

This endpoint currently requires session authentication; Personal Access Token scope support is in progress.

Form fields:

  • type (required): logo (the wide wordmark shown in the header and emails) or mark (the square icon used where space is tight).
  • file (required): PNG, JPG, WebP or SVG, at most 2 MB. A logo must be at least 200 px wide; a mark at least 64 × 64 px and roughly square (at most 1.25:1). Pixel sizes are not checked for SVGs.

Raster images are re-encoded (metadata stripped) and scaled down to 1200 px wide when larger. SVGs are sanitised: scripts, event handlers, external references and animated hrefs are removed, and an SVG with a DOCTYPE is refused. An image that cannot be read or an SVG that cannot be made safe returns 422 with the reason under errors.file.

Returns the resolved branding with the new logo_url / mark_url and a bumped version.

Requires a staff bearer token with the portal.manage permission.

Request​

Responses​

OK

Response Headers
    Content-Type