Skip to main content
POST
/
api
/
v1
/
auth
/
logout
Logout
curl --request POST \
  --url https://api.example.com/api/v1/auth/logout
{
  "status": 123,
  "message": "<string>",
  "meta": {}
}

Authentication

Required: Bearer token in the Authorization header.
Authorization: Bearer {your_access_token}

Request Body

This endpoint does not require any request body parameters.

Response

status
integer
HTTP status code (200 for success)
message
string
Success message confirming the logout
meta
object
Additional metadata (null for this endpoint)

Success Response Example

{
  "status": 200,
  "message": "Successfully logged out",
  "meta": null
}

Error Responses

Code Examples

curl -X POST https://api.sushigo.local/api/v1/auth/logout \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGc..."

Usage Notes

  • This endpoint revokes the current access token, making it invalid for future requests
  • After logout, the client should clear the stored token from memory/storage
  • The user will need to login again to obtain a new token
  • Revoking a token does not affect other tokens that may have been issued for the same user
  • If the token is already invalid or revoked, the endpoint returns a 401 error

Build docs developers (and LLMs) love