Branding

Replace the host brand

PUT/branding/host-brand

Replaces 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

  • dry_runboolean#

    Validate and run the call without committing it, returning what the real call would return with meta.dry_run set.

Headers

  • Idempotency-Keystring#

    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

{
  "colours": [
    {
      "name": "primary",
      "red": 12,
      "green": 74,
      "blue": 110,
      "alpha": 1
    },
    {
      "name": "accent",
      "red": 234,
      "green": 88,
      "blue": 12
    }
  ]
}

Responses

200

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.

HostBrandEnvelope
{
  "data": {
    "colours": [
      {
        "name": "primary",
        "red": 12,
        "green": 74,
        "blue": 110,
        "alpha": 1
      }
    ]
  }
}
401

Authentication failed. error.code is one of invalid_token, expired, revoked.

Error
403

Authorization failed. error.code is one of org_disabled, ip_blocked, missing_scope, scope_disabled, user_disabled.

Error
409

The request conflicts with existing state (error.code = conflict), e.g. a compliance flow with the requested name already exists.

Error
422

The request can't be processed (HTTP 422): validation_failed with one ErrorDetail per problem, or a code documented on the operation.

Error
429

Rate limit exceeded (error.code = rate_limited).

Error

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
    }
  ]
}'