Keycloak Users API

Manage users within a realm

Business capability
Identity & Access Management BC-620.20

Operations 47

GET /{realm}/users Keycloak List users #
POST /{realm}/users Keycloak Create a new user #
GET /{realm}/users/{userId} Keycloak Get a user #
PUT /{realm}/users/{userId} Keycloak Update a user #
DELETE /{realm}/users/{userId} Keycloak Delete a user #
GET /{realm}/users/{userId}/role-mappings/realm Keycloak Get realm-level role mappings for a user #
POST /{realm}/users/{userId}/role-mappings/realm Keycloak Add realm-level role mappings to a user #
DELETE /{realm}/users/{userId}/role-mappings/realm Keycloak Remove realm-level role mappings from a user #
GET /{realm}/users/{userId}/groups Keycloak Get groups for a user #
PUT /{realm}/users/{userId}/groups/{groupId} Keycloak Add a user to a group #
DELETE /{realm}/users/{userId}/groups/{groupId} Keycloak Remove a user from a group #
PUT /{realm}/users/{userId}/reset-password Keycloak Reset a user's password #
GET /{realm}/groups/{groupId}/members Keycloak Get members of a group #
GET /admin/realms/{realm}/users Get users Returns a stream of users, filtered according to query parameters #
POST /admin/realms/{realm}/users Create a new user Username must be unique #
GET /admin/realms/{realm}/users/count Returns the number of users that match the given criteria #
GET /admin/realms/{realm}/users/profile Get admin realms by realm users profile #
PUT /admin/realms/{realm}/users/profile Replace admin realms by realm users profile #
GET /admin/realms/{realm}/users/profile/metadata Get admin realms by realm users profile metadata #
GET /admin/realms/{realm}/users/{user-id} Get representation of the user #
PUT /admin/realms/{realm}/users/{user-id} Update the user #
DELETE /admin/realms/{realm}/users/{user-id} Delete the user #
GET /admin/realms/{realm}/users/{user-id}/configured-user-storage-credential-types Return credential types, which are provided by the user storage where user is… #
GET /admin/realms/{realm}/users/{user-id}/consents Get consents granted by the user #
DELETE /admin/realms/{realm}/users/{user-id}/consents/{client} Revoke consent and offline tokens for particular client from user #
GET /admin/realms/{realm}/users/{user-id}/credentials Get admin realms by realm users by user id credentials #
DELETE /admin/realms/{realm}/users/{user-id}/credentials/{credentialId} Remove a credential for a user #
POST /admin/realms/{realm}/users/{user-id}/credentials/{credentialId}/moveAfter/{newPreviousCredentialId} Move a credential to a position behind another credential #
POST /admin/realms/{realm}/users/{user-id}/credentials/{credentialId}/moveToFirst Move a credential to a first position in the credentials list of the user #
PUT /admin/realms/{realm}/users/{user-id}/credentials/{credentialId}/userLabel Update a credential label for a user #
PUT /admin/realms/{realm}/users/{user-id}/disable-credential-types Disable all credentials for a user of a specific type #
PUT /admin/realms/{realm}/users/{user-id}/execute-actions-email Send an email to the user with a link they can click to execute particular… #
GET /admin/realms/{realm}/users/{user-id}/federated-identity Get social logins associated with the user #
POST /admin/realms/{realm}/users/{user-id}/federated-identity/{provider} Add a social login provider to the user #
DELETE /admin/realms/{realm}/users/{user-id}/federated-identity/{provider} Remove a social login provider from user #
GET /admin/realms/{realm}/users/{user-id}/groups Get admin realms by realm users by user id groups #
GET /admin/realms/{realm}/users/{user-id}/groups/count Get admin realms by realm users by user id groups count #
PUT /admin/realms/{realm}/users/{user-id}/groups/{groupId} Replace admin realms by realm users by user id groups by group id #
DELETE /admin/realms/{realm}/users/{user-id}/groups/{groupId} Delete admin realms by realm users by user id groups by group id #
POST /admin/realms/{realm}/users/{user-id}/impersonation Impersonate the user #
POST /admin/realms/{realm}/users/{user-id}/logout Remove all user sessions associated with the user Also send notification to all… #
GET /admin/realms/{realm}/users/{user-id}/offline-sessions/{clientUuid} Get offline sessions associated with the user and client #
PUT /admin/realms/{realm}/users/{user-id}/reset-password Set up a new password for the user #
PUT /admin/realms/{realm}/users/{user-id}/reset-password-email Send an email to the user with a link they can click to reset their password #
PUT /admin/realms/{realm}/users/{user-id}/send-verify-email Send an email-verification email to the user An email contains a link the user… #
GET /admin/realms/{realm}/users/{user-id}/sessions Get sessions associated with the user #
GET /admin/realms/{realm}/users/{user-id}/unmanagedAttributes Get admin realms by realm users by user id unmanaged attributes #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/keycloak:keycloak-users-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

keycloak-users-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Keycloak Users API
  version: '1.0'
  description: 'Operations tagged Users across 2 of this provider''s published API definitions: keycloak-admin-rest-api-openapi.yml, keycloak-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://{host}/admin/realms
  description: Keycloak Admin REST API
  variables:
    host:
      default: localhost:8080
      description: Keycloak server host and port
tags:


# --- truncated at 32 KB (60 KB total) ---
# Full source: https://artifacts.apis.io/keycloak/openapi/keycloak-users-api-openapi.yml