Update an application
const url = 'http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/realms/customer-portal/applications/example';
const options = {
method: 'PATCH',
headers: {
'API-Version': '2026-06-01.beta',
'API-Key': '<API-Key>',
'Content-Type': 'application/json'
},
body: '{"name":"example","description":"example","status":"active","redirect_uris":["example"],"grant_types":["authorization_code"],"pkce_required":true,"consent_required":true,"saml_config":{"entity_id":"example","assertion_consumer_urls":["example"],"single_logout_service_url":"example","name_id_format":"urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified","sign_documents":true,"sign_assertions":true,"encrypt_assertions":true,"force_authn":true,"force_post_binding":true,"include_authn_statement":true,"attribute_statements":{"additionalProperty":"example"}},"web_origins":["example"],"post_logout_redirect_uris":["example"],"root_url":"example","base_url":"example","admin_url":"example"}'
};
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/applications/example \
--header 'API-Key: <API-Key>' \
--header 'API-Version: 2026-06-01.beta' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "description": "example", "status": "active", "redirect_uris": [ "example" ], "grant_types": [ "authorization_code" ], "pkce_required": true, "consent_required": true, "saml_config": { "entity_id": "example", "assertion_consumer_urls": [ "example" ], "single_logout_service_url": "example", "name_id_format": "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", "sign_documents": true, "sign_assertions": true, "encrypt_assertions": true, "force_authn": true, "force_post_binding": true, "include_authn_statement": true, "attribute_statements": { "additionalProperty": "example" } }, "web_origins": [ "example" ], "post_logout_redirect_uris": [ "example" ], "root_url": "example", "base_url": "example", "admin_url": "example" }'Partially updates an application. Only provided fields are modified.
Required scope: applications: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-portalOAuth 2.0 client identifier. Used as the stable resource identifier in this API and in Keycloak realm URLs.
Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Partial update request. All fields are optional; only provided fields are updated.
object
Updated display name.
Updated description. Pass an empty string to clear.
Updated status.
Replace the full set of allowed redirect URIs.
Replace the full set of enabled grant types.
Updated PKCE requirement.
Updated consent requirement.
Updated SAML configuration. Pass null to clear.
object
SAML entity ID (SP Entity ID / Issuer).
Assertion Consumer Service URLs (ACS endpoints).
Single Logout Service URL.
SAML NameID format.
Whether to sign SAML documents.
Whether to sign SAML assertions.
Whether to encrypt SAML assertions.
Whether to force re-authentication on each request.
Whether to force HTTP POST binding for responses.
Whether to include the AuthnStatement in assertions.
Static SAML attribute statements to include in assertions. Keys are attribute names; values are attribute values.
object
Browser origins allowed to call this application (CORS).
URIs a user may be redirected to after signing out.
Root URL. Prefixed to any relative redirect URI.
Home URL.
Admin URL.
Responses
Section titled “Responses”The request has succeeded.
A Keycloak client (application) registered in a realm.
object
OAuth 2.0 client identifier. Stable resource identifier for this API.
Human-readable display name.
Optional description of the application.
OAuth 2.0 client type.
Authentication protocol.
Whether the application is active.
Allowed redirect URIs for authorization-code flows. Required for authorization_code grant.
Enabled OAuth 2.0 grant types.
Whether PKCE (Proof Key for Code Exchange) is required.
Whether user consent is required before issuing tokens.
Whether this application has a service account for machine-to-machine flows. Derived from the client_credentials grant type.
Client secret. Present only immediately after creation or secret rotation; store it securely as it will not be returned again.
Browser origins allowed to call this application (CORS). ["*"] allows any origin.
URIs a user may be redirected to after signing out. Falls back to redirect_uris when empty.
Root URL. Prefixed to any relative redirect URI.
Home URL. Where Keycloak sends a user opening the application from the account console.
Admin URL. Where Keycloak sends back-channel logout and admin callbacks.
SAML-specific configuration. Present only when protocol is saml.
object
SAML entity ID (SP Entity ID / Issuer).
Assertion Consumer Service URLs (ACS endpoints).
Single Logout Service URL.
SAML NameID format.
Whether to sign SAML documents.
Whether to sign SAML assertions.
Whether to encrypt SAML assertions.
Whether to force re-authentication on each request.
Whether to force HTTP POST binding for responses.
Whether to include the AuthnStatement in assertions.
Static SAML attribute statements to include in assertions. Keys are attribute names; values are attribute values.
object
Example
{
"type": "confidential",
"protocol": "openid-connect",
"status": "active",
"grant_types": [
"authorization_code"
],
"saml_config": {
"name_id_format": "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"
}
}The server could not understand the request due to invalid syntax.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}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"
}The request conflicts with the current state of the server.
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"
}