Logout

Endpoint used for terminating the user's session and invalidating the current access token. After logout, the token can no longer be used for authentication.

Request

Property Value
Method POST
URL /api/auth/logout
Content-Type application/json
Authentication Bearer Token

Response

Status Codes

Code Description
200 Success - User logged out
400 Bad Request - Invalid parameters
401 Unauthorized - Invalid or expired token
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error

Successful Response (200)

{
  "meta": {
    "executionTime": 0,
    "generatedAt": 1763638702144
  },
  "message": "You have been logged out"
}
Parameter Type Description
meta.executionTime integer Request processing time in milliseconds
meta.generatedAt integer Response generation timestamp (Unix timestamp in ms)
message string Main response status message

Error Response (4xx/5xx)

{
  "message": "Could not authorize with given access token",
  "timestamp": 1763638715202
}
Parameter Type Description
message string Human-readable error message
timestamp integer Error timestamp (Unix timestamp in ms)

Notes

  • After logout, the access token is invalidated and cannot be reused.