Skip to content

Create or update login branding

PUT
/clusters/{cluster_id}/realms/{realm}/branding/login
curl --request PUT \
  --url http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/realms/customer-portal/branding/login \
  --header 'API-Key: <API-Key>' \
  --header 'API-Version: 2026-06-01.beta' \
  --header 'Content-Type: application/json' \
  --data '{ "primary_color": "#1a73e8", "background_color": "#1a73e8", "logo_url": "https://example.com", "favicon_url": "https://example.com", "font_url": "https://example.com", "font_family": "example", "apply_to_account_console": true, "apply_to_admin_console": true, "registration_enabled": true, "remember_me_enabled": true, "forgot_password_enabled": true, "terms_of_service_url": "https://example.com", "privacy_policy_url": "https://example.com", "show_powered_by": true, "sso": { "enabled": true, "layout": "vertical", "display_style": "logo_only", "button_size": "small" }, "internationalization": { "enabled": true, "default_locale": "example", "supported_locales": [ "example" ], "language_selector_style": "dropdown", "language_selector_position": "top_right", "language_selection_mode": "automatic_with_selector" } }'

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

cluster_id
required
string format: uuid
realm
required

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

string
>= 1 characters <= 63 characters /^[a-zA-Z][a-zA-Z0-9-]*$/

Example

customer-portal
API-Version
required
string
Allowed values: 2026-06-01.beta
Media typeapplication/json
object
primary_color

CSS hex color code.

string

Example

#1a73e8
background_color

CSS hex color code.

string

Example

#1a73e8
logo_url
string format: uri
favicon_url
string format: uri
font_url
string format: uri
font_family

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

string
<= 100 characters
apply_to_account_console

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

boolean
apply_to_admin_console

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

boolean
registration_enabled

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.

boolean
remember_me_enabled
boolean
forgot_password_enabled
boolean
terms_of_service_url
string format: uri
privacy_policy_url
string format: uri
show_powered_by
boolean
sso
object
enabled
required

Show identity provider buttons on the login page.

boolean
layout
required
string
Allowed values: vertical horizontal
display_style
required
string
Allowed values: logo_only logo_with_text text_only
button_size
required
string
Allowed values: small medium large
internationalization

Login page internationalization settings.

object
enabled
required
boolean
default_locale
required

IETF BCP 47 language tag used as the default locale.

string
>= 2 characters <= 20 characters
supported_locales
required

Locales available to users. Must include default_locale.

Array<string>
>= 1 items
language_selector_style
required
string
Allowed values: dropdown text_labels flags
language_selector_position
required
string
Allowed values: top_right top_left top_middle form_inside_header form_inside_left
language_selection_mode
required
string
Allowed values: automatic_with_selector automatic_only selector_only hide_selector

The request has succeeded.

Media typeapplication/json

Login page branding configuration for a Keycloak realm.

object
cluster_id
required
string format: uuid
realm
required

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

string
>= 1 characters <= 63 characters /^[a-zA-Z][a-zA-Z0-9-]*$/
primary_color

Primary accent color applied to buttons and interactive elements.

string
background_color

CSS hex color code.

string
logo_url

URL of the logo displayed on the login page.

string format: uri
favicon_url
string format: uri
font_url

URL of a custom web font.

string format: uri
font_family

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

string
apply_to_account_console

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

boolean
apply_to_admin_console

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

boolean
theme_name

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.

string
registration_enabled
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.

boolean
remember_me_enabled
required
boolean
forgot_password_enabled
required
boolean
terms_of_service_url
string format: uri
privacy_policy_url
string format: uri
show_powered_by
required

Display a ‘Powered by Skycloak’ badge in the footer.

boolean
sso
object
enabled
required

Show identity provider buttons on the login page.

boolean
layout
required
string
Allowed values: vertical horizontal
display_style
required
string
Allowed values: logo_only logo_with_text text_only
button_size
required
string
Allowed values: small medium large
internationalization

Login page internationalization settings.

object
enabled
required
boolean
default_locale
required

IETF BCP 47 language tag used as the default locale.

string
>= 2 characters <= 20 characters
supported_locales
required

Locales available to users. Must include default_locale.

Array<string>
>= 1 items
language_selector_style
required
string
Allowed values: dropdown text_labels flags
language_selector_position
required
string
Allowed values: top_right top_left top_middle form_inside_header form_inside_left
language_selection_mode
required
string
Allowed values: automatic_with_selector automatic_only selector_only hide_selector
status
required
string
Allowed values: applying applied failed
applied_at

Timestamp of the most recent successful deployment to Keycloak.

string format: date-time
created_at
required
string format: date-time
updated_at
required
string format: date-time

Example

{
  "realm": "customer-portal",
  "primary_color": "#1a73e8",
  "background_color": "#1a73e8",
  "sso": {
    "layout": "vertical",
    "display_style": "logo_only",
    "button_size": "small"
  },
  "internationalization": {
    "language_selector_style": "dropdown",
    "language_selector_position": "top_right",
    "language_selection_mode": "automatic_with_selector"
  },
  "status": "applying"
}

The server could not understand the request due to invalid syntax.

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

Access is unauthorized.

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

Access is forbidden.

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

The server cannot find the requested resource.

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

Client error

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri
errors
required
Array<object>
>= 1 items
object
field
required
string
detail
required
string
code
string
value

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com",
  "errors": [
    {
      "field": "example",
      "detail": "example",
      "code": "example",
      "value": "example"
    }
  ]
}

Client error

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}
Retry-After
integer
RateLimit-Limit
integer
RateLimit-Remaining
integer
RateLimit-Reset
integer
X-RateLimit-Limit-Second
integer
X-RateLimit-Remaining-Second
integer
X-RateLimit-Limit-Minute
integer
X-RateLimit-Remaining-Minute
integer
X-RateLimit-Limit-Hour
integer
X-RateLimit-Remaining-Hour
integer
X-RateLimit-Limit-Day
integer
X-RateLimit-Remaining-Day
integer

Server error

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

Server error

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}