Branding-Asset hochladen
Lädt ein Logo oder Favicon als Base64-Data-URL hoch. Assets werden in S3 gespeichert und der Branding-Datensatz wird automatisch aktualisiert. Erfordert die Admin-Rolle.
POST /api/organization/whitelabel/branding/upload
Logo-Typen: logo, logoLight, logoDark — akzeptiert PNG, JPEG, WebP, SVG (max. 2 MB).
Favicon-Typen: favicon, faviconLight, faviconDark — akzeptiert PNG, SVG, ICO (max. 512 KB).
Das Legacy-logo wird als logoLight behandelt und favicon als faviconLight.
Anfrage (Request Body)
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
kind | string | Ja | logo, logoLight, logoDark, favicon, faviconLight, faviconDark |
fileName | string | Ja | Ursprünglicher Dateiname (1–200 Zeichen) |
dataUrl | string | Ja | Base64-Data-URL (data:*/*;base64,...) |
Beispiel (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..."
}'Antwort (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"
}
}Häufige Fehler
400 Invalid dataUrlwenn das Data-URL-Format falsch ist400 Unsupported contentTypewenn der Content-Type für den Asset-Typ nicht erlaubt ist413 File too largewenn die Größenbeschränkungen überschritten werden503 Whitelabel asset storage is not configuredwenn S3 nicht eingerichtet ist
Branding aktualisieren
Aktualisiert die Branding-Konfiguration der Organisation. Alle Felder sind optional — nur gesendete Felder werden aktualisiert. Wird productName oder eine Theme-Farbe auf null gesetzt, wird sie geleert. Erfordert die Admin-Rolle.
Domain verifizieren
Verifiziert die DNS-TXT-Einträge für eine eigene Domain. Nur für Admins.