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.
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) ormark(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
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Content
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.