Update a realm group
const url = 'http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/realms/customer-portal/groups/4f7e3a1b-2c9d-4e5f-8a6b-1c2d3e4f5a6b';
const options = {
method: 'PATCH',
headers: {
'API-Version': '2026-06-01.beta',
'API-Key': '<API-Key>',
'Content-Type': 'application/json'
},
body: '{"name":"infra"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}curl --request PATCH \
--url http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/realms/customer-portal/groups/4f7e3a1b-2c9d-4e5f-8a6b-1c2d3e4f5a6b \
--header 'API-Key: <API-Key>' \
--header 'API-Version: 2026-06-01.beta' \
--header 'Content-Type: application/json' \
--data '{ "name": "infra" }'Renames the specified group. The canonical path is updated automatically.
Required scope: realm-groups:write
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Keycloak realm name (not ID). Must start with a letter; allows letters, digits, and hyphens.
Example
customer-portalExample
4f7e3a1b-2c9d-4e5f-8a6b-1c2d3e4f5a6bHeader Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Patch request for renaming a realm group.
object
New group name. The canonical path is updated automatically.
Example
infraExample
{
"name": "infra"
}Responses
Section titled “Responses”The request has succeeded.
object
Canonical group path.
Number of direct child groups.
Direct child groups. Only populated when include_subgroups=true is passed to the list endpoint.
object
Canonical group path.
Number of direct child groups.
Example
{
"id": "4f7e3a1b-2c9d-4e5f-8a6b-1c2d3e4f5a6b",
"name": "engineering",
"path": "/engineering",
"sub_group_count": 2
}Access is unauthorized.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Access is forbidden.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}The server cannot find the requested resource.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Client error
object
object
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
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Headers
Section titled “Headers”Server error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Server error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}