API
Phase Two extends the standard Keycloak Admin REST API with APIs for its extensions, such as organizations, webhooks, and magic links. These APIs run on your cluster, alongside Keycloak's own.
To manage Phase Two itself, such as creating clusters, realms, and custom domains, use the Management API instead.
Base URI format
Paths in the API reference are relative to this base URI:
- Format:
https://<your-cluster-host>/auth/realms - Example with a custom domain:
https://auth.example.com/auth/realms
<your-cluster-host> is the hostname shown for your cluster in the Dashboard, or a custom domain you have attached to it. Both serve the same APIs.
API sections
Access Service Accounts
It is recommended to create one (or more) service accounts in order to call the Phase Two and Keycloak admin APIs. A service account can be thought of as a special type of user that is associated with each Client in Keycloak, but does not have user status in your application.
Authentication
Every request to the Phase Two and Keycloak admin APIs needs an access token in the Authorization header:
Software Development Kits
Much of the functionality described here is documented in our API section. Our API is built as extensions to the standard Keycloak Admin REST API, and can be used in a similar way.