Skip to main content
POST /api/auth/logout Revokes a specific refresh token, preventing it from being used to generate new access tokens. Use this endpoint when a user signs out.
The access token is not invalidated by this endpoint — it will remain valid until it naturally expires. Only the refresh token is revoked.

Authentication

Authorization: Bearer <access_token>

Request body

refresh_token
string
required
The refresh token to revoke. This is the token previously issued by POST /api/auth/login.

Response

200 OK

The refresh token has been revoked. Subsequent calls to POST /api/auth/refresh with this token will return 401.
success
boolean
required
true on success.
message
string
Confirmation message.

Error responses

StatusDescription
400refresh_token field is missing from the request body
401Access token is missing or invalid
curl --request POST \
  --url https://task-forge-gbd6h8gtg8hchve9.chilecentral-01.azurewebsites.net/api/auth/logout \
  --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI0MiIsImlhdCI6MTc0MjI4NjQwMCwiZXhwIjoxNzQyMzcyODAwfQ.ghi789' \
  --header 'Content-Type: application/json' \
  --data '{
    "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI0MiIsImlhdCI6MTc0MjIwMDAwMCwiZXhwIjoxNzQ0NzkyMDAwfQ.def456"
  }'
{
  "success": true,
  "message": "Sesion cerrada con exito"
}

Build docs developers (and LLMs) love