Creating a realm using keyCloak Rest API

Hi,

Let me know on how to create a new realm using the keycloak Rest API. I am not sure on which API call to make and what user credentials to use for creating a new realm in KeyCloak.

Regards,
Willfin

If you are calling from an another application, keycloak has an admin client library, where you can create realms or you can directly call admin rest api to create new realm

https://www.keycloak.org/docs-api/11.0/rest-api/index.html#_realms_admin_resource

For user credentials you have to use admin-cli client and admin user. Let me know if this helps you :slight_smile: