Skip to content
Last updated

🔨 In Development — This section is still being developed and may change.
**POST** `/v1/auth/logout` - Logout the current user and invalidate their authentication tokens. This endpoint provides secure session termination and prevents token reuse.
POSThttps://api.freddy.aitronos.com/v1/auth/logout

Headers

Authorization string required

Bearer token for authentication (access token).

Request Body

refresh_token string optional

Refresh token to invalidate (recommended for complete cleanup).


Returns

A Logout response object containing confirmation of successful logout.


Response

{
  "message": "Successfully logged out",
  "logged_out_at": "2025-11-02T10:30:00Z"
}

Logout with refresh token

Bash
curl -X POST https://api.freddy.aitronos.com/v1/auth/logout \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "refresh_token": "'$REFRESH_TOKEN'"
  }'

Simple logout

Bash
curl -X POST https://api.freddy.aitronos.com/v1/auth/logout \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Response examples

JSON
{
  "message": "Successfully logged out",
  "logged_out_at": "2025-11-02T10:30:00Z"
}