Realms

Create a realm

Creates a new realm in the specified cluster. The cluster must be in the available state.

Required scope: realms:write

post/clusters/{cluster_id}/realms

Request

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

Path parameters

cluster_idstring uuid required

Headers

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

Request body

namestring required

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

display_namestring
apply_default_brandingboolean

Whether to apply Skycloak's default login branding to the new realm. Defaults to true when omitted, so the realm serves the Skycloak look instead of the stock Keycloak login page. Set to false to leave the realm's themes untouched. Branding can always be applied or reset later from the realm's Branding page.

Example request

{
  "name": "customer-portal",
  "display_name": "Customer Portal"
}

Response

The request has succeeded and a new resource has been created as a result.

idstring uuid required

Keycloak realm ID. This is a UUID generated by Keycloak.

namestring required

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

display_namestring required
enabledboolean required

Whether users can sign in to this realm.

ssl_required'external' | 'all' | 'none' required

Keycloak SSL requirement. Maps directly to Keycloak's sslRequired realm setting.

registration_allowedboolean required

Whether self-registration is open to anyone.

registration_email_as_usernameboolean required

Whether email addresses are used as usernames during registration.

login_with_email_allowedboolean required

Whether users can sign in with their email address instead of username.

duplicate_emails_allowedboolean required

Whether multiple accounts may share the same email address.

created_atstring date-time

Time when the realm was created, when available.

default_branding_appliedboolean

Whether Skycloak's default login branding was applied to the realm as part of this create. false when apply_default_branding was set to false, and also when the branding step failed: the realm is created either way, and branding can be applied from the realm's Branding page.

Example response

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "customer-portal",
  "enabled": true,
  "login_with_email_allowed": true,
  "default_branding_applied": true
}

Changes

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