Skip to main content

Endpoint

POST /api/auth/logout
Logout a user by invalidating their refresh token. After logout, the refresh token can no longer be used to obtain new access tokens. No authentication required.

Request body

refreshToken
string
required
Valid refresh token to be invalidated.

Response

success
boolean
Indicates whether the request was successful.
timestamp
string
ISO 8601 timestamp of when the response was generated.

Example request

curl -X POST http://localhost:8080/api/auth/logout \
  -H "Content-Type: application/json" \
  -d '{
    "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
  }'

Example response

{
  "success": true,
  "timestamp": "2026-03-03T10:45:00Z"
}

Build docs developers (and LLMs) love