Replace the host brand
/branding/host-brandReplaces the colours of the token organisation's host with the list sent and returns them. Needs permission to change the organisation, else 403 missing_permission; a service identity cannot. No host returns 409 conflict. dry_run shows the result without saving it. Emits branding.updated once with the group host_brand in changed_fields, not individual colours, only when the colours changed; no email. Sending the earlier colours undoes it.
Query parameters
Validate and run the call without committing it, returning what the real call would return with
meta.dry_runset.
Headers
Makes a retry safe. Send a new UUID for each new request and reuse it only to retry that request; the first response is replayed for 24 hours.
Request body
application/json, required · HostBrandReplace
Every colour the host brand should hold. An empty list removes them all.
{
"colours": [
{
"name": "primary",
"red": 12,
"green": 74,
"blue": 110,
"alpha": 1
},
{
"name": "accent",
"red": 234,
"green": 88,
"blue": 12
}
]
}Responses
The host brand colours after the change. A stored colour whose name matches, ignoring case, keeps its identity and takes the new values; a new name is added and a stored name left out is deleted. The platform caches its compiled stylesheet and this call cannot clear it, so open pages can show the old colours until it expires.
{
"data": {
"colours": [
{
"name": "primary",
"red": 12,
"green": 74,
"blue": 110,
"alpha": 1
}
]
}
}Authorization failed. error.code is one of org_disabled,
ip_blocked, missing_scope, scope_disabled, user_disabled.
The request conflicts with existing state (error.code = conflict),
e.g. a compliance flow with the requested name already exists.
The request can't be processed (HTTP 422): validation_failed with one ErrorDetail per
problem, or a code documented on the operation.
Examples
curl -X PUT https://your-org-domain/kong/core/api/v2/branding/host-brand\
-H "Authorization: Bearer $HELM_API_KEY"\
-H "Content-Type: application/json"\
-d '{
"colours": [
{
"name": "primary",
"red": 12,
"green": 74,
"blue": 110,
"alpha": 1
},
{
"name": "accent",
"red": 234,
"green": 88,
"blue": 12
}
]
}'