ZITADEL API Reference Overview
ZITADEL exposes all features via different gRPC and REST APIs and provides SDKs for popular languages and frameworks.
The OpenID Connect & OAuth endpoints and SAML 2.0 endpoints are implemented and exposed according to the specific standards. Managing resources such as users, organizations, instances, or settings must be done with the different ZITADEL APIs.
Actions allow to extend ZITADEL with custom code to change default behaviors or calling external systems.
Authentication & authorizationβ
Authentication for human users (interactive)β
ZITADEL implements industry standards such as OpenID Connect, OAuth 2.0, or SAML for authentication. Please refer to our guides how to authenticate users through an interactive authentication process.
For user authentication on devices with limited accessibility (eg, SmartTV, Smart Watch etc.) use the device authorization grant.
Additionally, you can use the session API to authenticate users, for example by building a custom login UI.
Authenticate service users and machinesβ
Service users allow for machine-to-machine (M2M) communication. Follow the guides to learn how to authenticate service users.
Accessing the ZITADEL APIs through a service user might require additional steps, please follow the guide on how to access ZITADEL APIs to include the correct audience scope in your requests.
OpenID Connect & OAuthβ
- OpenID Connect endpoints definition
- Standard and reserved scopes reference
- Standard, custom, and reserved claims reference
The OIDC Playground is for testing OpenID authentication requests and their parameters.
SAML 2.0β
- SAML 2.0 endpoints definition
- Custom attributes can be added with an action
Customβ
ZITADEL allows to authenticate users by creating a session with the Session API or get OIDC authentication request details with the OIDC service API. User authorizations can be retrieved as roles from our APIs.
Refer to our guide to learn how to build your own login UI
ZITADEL APIs (resource-based)β
ZITADEL provides APIs for each core resource:
We are migrating to a resource-based API approach. You might need to use the existing service-based APIs for now to manage Organizations, Instances, Assets etc.
ZITADEL APIs (service-based)β
ZITADEL APIs were organized by UseCase/Context, such as Auth API for authenticated users and Management API for organization managers. This led to confusion about which API to use, particularly for requests that could be useful across multiple APIs but with different filters. For instance, SearchUsers on an Instance Level or on an Organization Level.
To address this issue, ZITADEL is migrating to a resource-based API.
Authenticationβ
The authentication API (aka Auth API) is used for all operations on the currently logged in user. The user id is taken from the sub claim in the token.
GRPCβ
Endpoint: $ZITADEL_DOMAIN/zitadel.auth.v1.AuthService/
Definition: Auth Proto
RESTβ
Endpoint: $ZITADEL_DOMAIN/auth/v1/
API Reference: OpenAPI Docs
Managementβ
The management API is as the name states the interface where systems can mutate IAM objects like, organizations, projects, clients, users and so on if they have the necessary access rights.
To identify the current organization you can send a header x-zitadel-orgid
or if no header is set, the organization of the authenticated user is set.
GRPCβ
Endpoint: $ZITADEL_DOMAIN/zitadel.management.v1.ManagementService/
Definition: Management Proto
RESTβ
Endpoint: $ZITADEL_DOMAIN/management/v1/
API Reference: OpenAPI Docs
Administrationβ
This API is intended to configure and manage one ZITADEL instance itself.
GRPCβ
Endpoint: $ZITADEL_DOMAIN/zitadel.admin.v1.AdminService/
Definition: Admin Proto
RESTβ
Endpoint: $ZITADEL_DOMAIN/admin/v1/
API Reference: OpenAPI Docs
Systemβ
This API is intended to manage the different ZITADEL instances within the system.
Checkout the guide how to access the ZITADEL System API.
GRPCβ
Endpoint: $ZITADEL_DOMAIN/zitadel.system.v1.SystemService/
Definition: System Proto
RESTβ
Endpoint: $ZITADEL_DOMAIN/system/v1/
API Reference: OpenAPI Docs
API definitionsβ
Each service's proto definition is located in the source control on GitHub. As we generate the REST services and Swagger file out of the proto definition we recommend that you rely on the proto file. We annotate the corresponding REST methods on each possible call as well as the AuthN and AuthZ requirements. The last API (assets) is only a REST API because ZITADEL uses multipart form data for certain elements.
SDKsβ
ZITADEL provides some official and community supported SDKs for multiple languages and frameworks. Most languages allow you to build a client from proto definitions, which allows you to build your own client in case an SDK is missing.
Protoβ
All of our APIs are generated by proto definitions. You can find all the proto definitions in the Proto API Definitions.
More about Protocol Buffer
Swagger documentationβ
We provide some json files for the swagger documentation of our APIs with the following link: https://zitadel.cloud/openapi/v2/swagger/
The easiest way to have a look at them is, to import them in the Swagger Editor
Exampleβ
See below for an example with the call GetMyUser.
//User
rpc GetMyUser(google.protobuf.Empty) returns (UserView) {
option (google.api.http) = {
get: "/users/me"
};
option (zitadel.v1.auth_option) = {
permission: "authenticated"
};
}
As you can see the GetMyUser
function is also available as a REST service under the path /users/me
.
In the table below you can see the URI of those calls.
Service | URI |
---|---|
REST | $ZITADEL_DOMAIN/auth/v1/users/me |
GRPC | $ZITADEL_DOMAIN/zitadel.auth.v1.AuthService/GetMyUser |