Realm Groups

Create a realm group

Creates a new group. Omit parent_id to create a top-level group.

Required scope: realm-groups:write

post/clusters/{cluster_id}/realms/{realm_name}/groups

Request

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

Path parameters

cluster_idstring uuid required
realm_namestring 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

namestring required

Group name (leaf segment of the path).

parent_idstring uuid

Example request

{
  "name": "platform",
  "parent_id": "4f7e3a1b-2c9d-4e5f-8a6b-1c2d3e4f5a6b"
}

Response

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

idstring uuid required
namestring required
pathstring required

Canonical realm group path.

sub_group_countinteger

Number of direct child groups.

Example response

{
  "id": "4f7e3a1b-2c9d-4e5f-8a6b-1c2d3e4f5a6b",
  "name": "engineering",
  "path": "/engineering",
  "sub_group_count": 2
}

Changes

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