Skip to main content

POST /auth/logout

This endpoint invalidates the user’s session by revoking their tokens. This is an authenticated endpoint and requires a valid access token.

Request Body

refreshToken
string
The refresh token to be revoked along with the access token.

Response

success
boolean
Indicates whether the logout was successful.
message
string
A confirmation message.
curl -X POST https://api.llmgenerator.com/api/v1/auth/logout \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
        "refreshToken": "YOUR_REFRESH_TOKEN"
      }'
{
  "success": true,
  "message": "Logged out successfully"
}