The configuration form in one multipart request: the products the
branding applies to, the brand name, the assets being uploaded and the
ones being emptied. Written in a single transaction — products left out
of products lose their configuration, assets named in clear are
emptied, and assets that are neither uploaded nor cleared keep their
current value.
Requires rebranding to be enabled for the organization. A partner may only write its own organization; the organizations below inherit the branding.
Responses
-
Configuration saved
-
Validation failed.
data.typeis alwaysvalidation_error.data.errors[]lists per-field failures with stablemessagecodes the UI consumes for i18n:at_least_one_required(no product selected),unknown(product id, asset name or organization id that does not exist),max(brand name longer than 100 characters).A malformed multipart body, a file over its size limit or an unsupported content type answer 400 with a plain message instead: they are not field validation, they are a request the server could not read.
-
Forbidden - insufficient permissions
curl \
--request PUT 'https://api.your-domain.com/api/rebranding/{org_id}/config' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: multipart/form-data" \
--form "products=nethvoice,nsec" \
--form "brand_name=UrbanGrid" \
--form "clear=string" \
--form "logo_light_rect=@file" \
--form "logo_dark_rect=@file" \
--form "logo_light_square=@file" \
--form "logo_dark_square=@file" \
--form "favicon=@file" \
--form "background_image=@file"
{
"code": 42,
"message": "string",
"data": {
"applied_to_organizations": 45
}
}
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "products",
"message": "at_least_one_required"
}
]
}
}
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "products",
"message": "unknown",
"value": "nethvoice-pro"
}
]
}
}
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "organization_ids",
"message": "unknown",
"value": "org-che-non-esiste"
}
]
}
}
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "brand_name",
"message": "max"
}
]
}
}
{
"code": 403,
"message": "insufficient permissions",
"data": {}
}