Revoke a session
DELETE
/auth/sessions/{id}
const url = 'https://localhost:3000/api/v1/auth/sessions/example';const options = {method: 'DELETE', headers: {Authorization: '<Authorization>'}};
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://localhost:3000/api/v1/auth/sessions/example \ --header 'Authorization: <Authorization>'Revokes one of the authenticated account’s sessions and invalidates its refresh token.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Session ID (UUID)
Responses
Section titled “Responses”Session revoked
Media typeapplication/json
Invalid session ID
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Unauthorized
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Session not found
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Internal error
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}