Terminates the authenticated user’s session by invalidating the active authentication tokens and session identifiers associated with the request. Depending on the authentication mechanism, this may involve revoking a refresh token, and clearing server-side session data and cookies.
Request
Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Cookie Params
Responses
🟢200Success
application/json
Bodyapplication/json
🟠400Validation Error
🟠401Token Missing
🟠401Invalid Token
🟠401Token Expired
🟠403Account Soft Deleted
🟠403Account Deactivated
🟠403Account Locked
🟠403Account Not Verified
🟠401Session Not Found
🟠401Session Revoked
🟠401Session Expired
🟠429Rate Limit Exceeded
🔴500Internal Server Error
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'http://localhost:3000/api/v1/auth/logout' \
--header'Authorization: Bearer <token>' \
--header'Cookie: rt='
Response Response Example
200 - Example
{"status":"success","message":"Logged out successfully."}