Terminates an existing session by invalidating it and its token. The session can no longer be used for authentication or to access ZITADEL APIs.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
Permissions
Requiressession.delete permission, or no permission if deleting your own session or providing the current session token.
Path Parameters
The unique identifier of the session to terminate (1-200 characters).
Request Body
The current token of the session, previously returned on create/update. The token is required unless:
- The caller created the session
- The authenticated user requests their own session (checked user)
- The security token in the authorization header has the same user agent as the session
- The caller has
session.deletepermission on the instance or user’s organization
Response
Example Request
Example Response
Error Responses
| Status Code | Description |
|---|---|
| 400 | Invalid session ID or token |
| 401 | Unauthorized - missing or invalid authentication |
| 403 | Forbidden - insufficient permissions |
| 404 | Session not found |
Use Cases
User-Initiated Logout
Allow users to log out from your application:- Get the session ID from your application state
- Call this endpoint with the session token
- Clear local session data
Security: Remote Session Termination
Allow users to terminate sessions from other devices:- List all sessions for the user
- Display active sessions with device information
- Allow user to terminate suspicious sessions
- Call this endpoint without the session token (requires
session.deletepermission)
Administrative Session Cleanup
Terminate sessions as an administrator:- List sessions based on criteria (expired, inactive, etc.)
- Call this endpoint with appropriate permissions
- Session is immediately invalidated
Notes
- Once terminated, the session token becomes invalid immediately
- The session cannot be used for OIDC/SAML authentication
- The session cannot be used as an OAuth2 access token
- Terminated sessions remain in the list until explicitly deleted
- You can only terminate your own session unless you have
session.deletepermission