/v1/mgmt/user/logout/sessionAuthorization
Descope Project ID and Management Key Project ID:Management Key as bearer token.
In: header
Request Body
application/json
The user's login identifier (external ID). Provide either loginId or userId.
The user's ID. Provide either loginId or userId.
The session to log out: the fti claim of the session's session JWT or refresh JWT, or the refresh JWT's jti when it has no fti. A session JWT's own jti is not a session id.
1 <= lengthLog a user out of a single session, identified by user and session id, using a valid management key. The user's other sessions keep working. Use this to end one device's session - for troubleshooting or in response to a suspected compromise - when you do not hold that session's refresh token; to end every session of a user, use the logout endpoint instead. Identify the user by loginId or userId, and name the session with its sessionId: the fti claim of the session's session JWT or refresh JWT (the session JWT carries it when the project's JWT template adds a jti), or the refresh JWT's jti when it has no fti. A session JWT's own jti is not a session id. Once logged out the session can no longer refresh, and already-issued session JWTs for it are rejected by online validation rather than only lapsing at expiration. Only a session the endpoint can identify is logged out: one of the user's most recent active sessions, which Descope tracks (the last 5 by default). Any other sessionId - one that is unknown, expired, or older than the tracked sessions - is refused with a not-found error and nothing is logged out. Repeating the call for a session that was already logged out succeeds without changing anything, and the response's alreadyRevoked field is true.
curl -X POST "https://api.descope.com/v1/mgmt/user/logout/session" \ -H "Content-Type: application/json" \ -d '{ "sessionId": "string" }'{ "alreadyRevoked": true}export interface Response {/** * True when the session was already logged out before this call, so the request changed nothing. False when this call logged it out. */alreadyRevoked?: boolean}Logout Sessions Created in a Time Range POST
Log out every session in the project that was created inside a time range, using a valid management key. This is a project-wide rule: each matching session is logged out at its next refresh or validation, not immediately, and legitimate logins in the range are logged out too. The rule holds until it is deleted with the delete endpoint, or until it expires on its own one year after sessionsCreatedBefore; list the active rules with the list endpoint. A session refused at a refresh stays logged out after the rule is deleted or expires, and a user with many sessions in the range may be logged out of all their sessions. A range cannot cover time before the feature's rollout: sessionsCreatedAfter is clamped to it, the response shows the clamped value, and a range ending at or before it is rejected. Provide at least one of sessionsCreatedAfter and sessionsCreatedBefore as RFC 3339 times: sessionsCreatedAfter defaults to the beginning of time, and sessionsCreatedBefore defaults to now and cannot be in the future. sessionTypes limits the rule to sessions whose dtt claim matches one of its values exactly. No count of logged-out sessions is returned. To log out specific users, use the batch logout endpoint.
Remove User Passkey POST
Remove a specific passkey for a user by credential ID, using a valid management key.