Update tenant branding
Request to update the branding configuration of a tenant:
PUT /api/v2/tenants/<tenant-id>/branding.json
HTTP body should contain a JSON document with the branding attributes to update.
For example:
{
"branding": {
"enabled": true,
"color": "#123456",
"header_menu": {
"logo_type": "text",
"logo_text": "ACME"
}
}
}
This is a partial update. Attributes that are not included in the request keep their current
values, including the attributes inside login_page and header_menu. Unknown attributes and the
read-only logo attribute are ignored.
The response body contains the complete branding configuration after the update, in the same format as View tenant branding.
See Branding object fields for a description of all attributes.
Validation rules
colorandcolor2must match the format#rrggbbor be an empty string.logo_textis required whenlogo_typeistext, and is limited to 32 characters.- Setting
logo_typeof a location totextremoves the logo image stored for that location. - Logo images cannot be set through this endpoint. Use Upload tenant logo
instead. Uploading an image sets
logo_typeof the location tologoautomatically. custom_cssis limited to 4 KB and is checked by the same CSS sanitizer as the branding form in the web portal. CSS that contains suspicious constructs (for example,url(...),@import, or script vectors) is rejected with 400 Bad Request and nothing is saved. Accepted CSS is stored and returned exactly as submitted. The web portal renders a sanitized version (for example, with comments stripped).
Response contains HTTP status code as shown in the following table.
| Response | Description |
|---|---|
| 200 OK | Branding configuration has been successfully updated |
| 400 Bad Request | The request cannot be completed because supplied JSON object has invalid data. The response has content type |
| 403 Forbidden | The request cannot be completed because API user has no permission to edit branding |
| 404 Not Found | Tenant with such ID does not exist, or it is not visible to the API user (a tenant administrator can edit their own tenant only) |