Revoke My Session
DELETE
/api/api/me/sessions/{session_id}
const url = 'https://example.com/api/api/me/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/api/api/me/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>'Revoke a specific session.
If the revoked session is the current one, the user will be logged out on the next token refresh attempt. Revoking the current session is allowed.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”session_id
required
Session Id
string format: uuid
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
RevokeSessionResponse
object
revoked
required
Revoked
boolean
Examplegenerated
{ "revoked": true}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}