POST /api/logout
Revokes the current authentication token, effectively logging out the user. After logout, the token can no longer be used for authenticated requests.Authentication
This endpoint requires a valid authentication token obtained from the register or login endpoints. Include the token in the Authorization header:Request body
This endpoint does not require a request body.Response
Confirmation message indicating successful logout.
Error responses
Example request
Example response
200 OK
401 Unauthorized
After logout, you’ll need to obtain a new token by calling the login endpoint to make authenticated requests again.