Creates a new session with initial checks, metadata, and challenges for further verification. Returns a session token that can be used for authentication.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/zitadel/zitadel/llms.txt
Use this file to discover all available pages before exploring further.
HTTP Request
Request Body
The checks to be performed during session creation. On successful checks, the session’s factors will be updated.
Check the password. Requires that the user is already checked.
The password to verify (1-200 characters).
Check WebAuthN credential. Requires user check and a previously requested challenge.
JSON representation of the public key credential from the WebAuthN client.
Check TOTP code. Requires that the user is already checked.
The 6-digit TOTP code.
Check OTP sent via SMS. Requires that the user is already checked.
The OTP code received via SMS.
Custom key-value pairs to store on the session. Values are stored as bytes.
Challenges to request for further verification. The challenges will be returned in the response.
Duration after which the session will be automatically invalidated (e.g., “18000s” for 5 hours). If not set, the session will not expire automatically.
Response
Unique identifier of the newly created session.
The session token to use for authentication. This can be used as an OAuth2 access token or to authenticate OIDC/SAML requests.
The challenges that were requested for the session, ready for use in subsequent checks.
Example Request
Example Response
Error Responses
| Status Code | Description |
|---|---|
| 400 | Invalid request body or failed verification |
| 401 | Unauthorized - missing or invalid authentication |
| 403 | Forbidden - insufficient permissions |
Notes
- A user check can only be performed once per session and cannot be changed afterwards
- Some checks require the user to be verified first (password, TOTP, OTP)
- Other checks require a previously requested challenge (WebAuthN, IDP intent)
- The session token should be kept secure and treated like an access token
- Previous session tokens are invalidated when the session is updated