Login Branding

Create or update login branding

Creates or replaces the login page branding for a realm. Triggers asynchronous theme generation and deployment; poll the status field to confirm completion.

Required scope: branding:write

put/clusters/{cluster_id}/realms/{realm}/branding/login

Request

  • Base URL: http://localhost:8000
  • URL: http://localhost:8000/clusters/{cluster_id}/realms/{realm}/branding/login
  • Auth: API key in header API-Key

Path parameters

cluster_idstring uuid required
realmstring required

Keycloak realm name (not ID). Must start with a letter; allows letters, digits, and hyphens.

Example:customer-portal

Headers

API-Version'2026-06-01.beta' required

Request body

primary_colorstring

CSS hex color code.

background_colorstring

CSS hex color code.

logo_urlstring uri
favicon_urlstring uri
font_urlstring uri
font_familystring

CSS font-family name used with font_url: letters, digits, spaces, hyphens and underscores only. Omitted means unchanged.

apply_to_account_consoleboolean

Apply the login branding to the realm's account console. Omitted means unchanged.

apply_to_admin_consoleboolean

Apply the login branding to the realm's admin console. Omitted means unchanged.

registration_enabledboolean

Sets the realm's own self-registration setting (Keycloak registrationAllowed). Omitted means unchanged: unlike the other fields, leaving it out does not reset it to a default.

remember_me_enabledboolean
forgot_password_enabledboolean
terms_of_service_urlstring uri
privacy_policy_urlstring uri
show_powered_byboolean

Example request

{
  "primary_color": "#1a73e8",
  "background_color": "#1a73e8"
}

Response

The request has succeeded.

cluster_idstring uuid required
realmstring required

Keycloak realm name (not ID). Must start with a letter; allows letters, digits, and hyphens.

primary_colorstring

CSS hex color code.

background_colorstring

CSS hex color code.

logo_urlstring uri

URL of the logo displayed on the login page.

favicon_urlstring uri
font_urlstring uri

URL of a custom web font.

font_familystring

CSS font-family name used with font_url, for example Inter.

apply_to_account_consoleboolean

Whether the realm's account console uses the login branding.

apply_to_admin_consoleboolean

Whether the realm's admin console uses the login branding.

theme_namestring

The realm's current Keycloak login theme, read live from the realm. Every branding save installs the theme under a new name, so read it from here rather than pinning it in realm configuration. Absent when the realm uses Keycloak's default theme.

registration_enabledboolean required

The realm's own self-registration setting (Keycloak registrationAllowed), read live from the realm. It is the same field the realm API exposes as registration_allowed; branding keeps no copy of it.

remember_me_enabledboolean required
forgot_password_enabledboolean required
terms_of_service_urlstring uri
privacy_policy_urlstring uri
show_powered_byboolean required

Display a 'Powered by Skycloak' badge in the footer.

status'applying' | 'applied' | 'failed' required
applied_atstring date-time

Timestamp of the most recent successful deployment to Keycloak.

created_atstring date-time required
updated_atstring date-time required

Example response

{
  "realm": "customer-portal",
  "primary_color": "#1a73e8",
  "background_color": "#1a73e8"
}

Changes

No recorded changes to this operation across all 1 revision of this API.