DELETE /session/
Close User Session
DELETE
/session/{session_key}
Close an active user session and revoke its token.
Looks up the UserSession by session_key, validates that the caller owns
it (token signature match), and calls auth.close_session. With ?force=true
an admin or production-scoped user can close another user's session. The bearer
token is decoded with verify_expiration=False so expired tokens can still
trigger a logout.
Emits: (direct transaction — no event class)
Required scope: auth:session:close
Authorizations
OAuth2PasswordBearer
password Flow
Token URL
"/api/auth"Scopes:
"admin"User can access and edit users and system settings"library"User can access and edit products"production"User can access and edit production plans"operator"User can access the operator panel and make production declarations
Parameters
Path Parameters
session_key*
Type
Requiredstring
Query Parameters
force
Default
falseResponses
Successful Response
application/json
JSON "status": 200, "message": "string", "detail": "string"
{
}