Reten Docs
Authentication

Logout

Clear the refresh token cookie to log out.

POST /api/auth/logout

Clears the refresh token cookie, effectively logging the user out.

Auth: Public

Example

curl -X POST https://api.reten.ai/api/auth/logout \
  -b "refreshToken=eyJhbGciOiJIUzI1NiIs..."
import axios from 'axios';

await axios.post(
  'https://api.reten.ai/api/auth/logout',
  {},
  { withCredentials: true }
);

Response 200 OK

{
  "message": "Logged out successfully"
}

The refreshToken cookie is cleared.