Owner-only. Enables rebranding for a whole selection at once. Either every organization is added or none is: if any id cannot be resolved the call answers 400 with the offending ids and writes nothing.
Responses
-
Rebranding enabled
-
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.
-
Unauthorized - invalid or missing token
-
Forbidden - insufficient permissions
curl \
--request POST 'https://api.your-domain.com/api/rebranding/organizations' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"organization_ids":["string"]}'
{
"organization_ids": [
"string"
]
}
{
"code": 42,
"message": "string",
"data": {
"enabled": 42
}
}
{
"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": 401,
"message": "invalid token",
"data": {}
}
{
"code": 403,
"message": "insufficient permissions",
"data": {}
}