Skip to content

Replace the cluster's feature flags

PUT
/clusters/{cluster_id}/features
curl --request PUT \
  --url http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/features \
  --header 'API-Key: <API-Key>' \
  --header 'API-Version: 2026-06-01.beta' \
  --header 'Content-Type: application/json' \
  --data '{ "features": [ "token-exchange" ], "apply_now": false }'

Replaces the cluster’s whole set of enabled feature flags; flags left out are turned off. Flags that only Skycloak can set are left as they are. A change restarts Keycloak, and the response says so.

When the cluster has a maintenance window the change stays pending until the window opens. Set apply_now to restart at once. A cluster without a maintenance window applies the change at once. A request that leaves the set as it was restarts nothing, unless a change is still pending: the response then reports that change, and apply_now restarts at once. A cluster that is updating for another reason is reported the same way.

Returns 422 when a flag is unknown or the cluster’s Keycloak version is below the flag’s minimum version, 403 when a trial workspace has not been approved to change flags, and 409 when the cluster is not available.

Required scope: clusters:write

cluster_id
required
string format: uuid
API-Version
required
string
Allowed values: 2026-06-01.beta
Media typeapplication/json

Replaces the cluster’s whole set of enabled feature flags.

object
features
required

The complete set of enabled feature flags. Flags missing from the list are turned off. Flags that only Skycloak can set and that are already on the cluster are ignored; other flags outside the list from GET /cluster-features are refused.

Array<string>
apply_now

Restart Keycloak at once instead of waiting for the cluster’s maintenance window. Has no effect on a cluster without a maintenance window, which always applies at once. Defaults to false.

boolean

Example

{
  "features": [
    "token-exchange"
  ],
  "apply_now": false
}

The request has succeeded.

Media typeapplication/json

Outcome of replacing a cluster’s feature flags.

object
features
required

The enabled feature flags after the change.

Array<string>
restarts_keycloak
required

True when the change restarts Keycloak, including a change from an earlier request that is still pending. False when the request left the set as it was and nothing is pending.

boolean
change

Whether the restart is pending for the maintenance window or applying now. Absent when nothing restarts.

object
state
required

Where a Keycloak feature flag change stands.

string
Allowed values: pending applying
next_window

When the maintenance window next opens. Present for a pending change whose window could be resolved.

string format: date-time
impact

Customer-facing description of how disruptive the restart is for this cluster’s size. Absent when nothing restarts.

string

Example

{
  "change": {
    "state": "pending"
  }
}

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"
}

The request conflicts with the current state of the server.

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"
}