Whitelabel
Upload Branding Asset
Uploads a logo or favicon as a base64 data URL. Assets are stored in S3 and the branding record is updated automatically. Requires admin role.
POST /api/organization/whitelabel/branding/upload
Logo types: logo, logoLight, logoDark — accepts PNG, JPEG, WebP, SVG (max 2 MB).
Favicon types: favicon, faviconLight, faviconDark — accepts PNG, SVG, ICO (max 512 KB).
Legacy logo is treated as logoLight, and favicon as faviconLight.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
kind | string | Yes | logo, logoLight, logoDark, favicon, faviconLight, faviconDark |
fileName | string | Yes | Original file name (1–200 chars) |
dataUrl | string | Yes | Base64 data URL (data:*/*;base64,...) |
Example (cURL)
curl -X POST "$BASE_URL/api/organization/whitelabel/branding/upload" \
-H "Cookie: $SESSION_COOKIE" \
-H "Content-Type: application/json" \
-d '{
"kind": "logoLight",
"fileName": "logo.svg",
"dataUrl": "data:image/svg+xml;base64,PHN2Zy..."
}'Response
{
"success": true,
"uploaded": {
"kind": "logo",
"objectKey": "branding/org-1/logo/light/1710000000-logo.svg",
"contentType": "image/svg+xml",
"bytes": 1234,
"publicUrl": "https://s3.example.com/branding/org-1/logo/light/1710000000-logo.svg?..."
},
"branding": {
"productName": "Acme Monitor",
"hideProductName": false,
"logoUrl": "https://s3.example.com/...",
"themePrimary": "#43B1AE",
"updatedAt": "2026-04-15T12:00:00.000Z"
}
}Common errors
400 Invalid dataUrlwhen the data URL format is wrong400 Unsupported contentTypewhen the content type is not allowed for the asset kind413 File too largewhen exceeding size limits503 Whitelabel asset storage is not configuredwhen S3 is not set up