Skip to main content
POST
Logout

Endpoint

Base URL: http://localhost:3000/api/v1
This endpoint does not use Bearer authentication. It requires the refreshToken cookie issued at login or email verification.

Authentication

Include the refresh token cookie with the request:
If you call this endpoint from the browser, send credentials:

Description

This endpoint:
  • verifies the refresh token from the cookie
  • invalidates it in storage
  • clears the refreshToken cookie from the response

Response

Success Response (200 OK)

Error Responses

401 Unauthorized - Refresh Token Not Found

401 Unauthorized - Invalid Refresh Token

Notes

Cookie-Based Logout: This endpoint is tied to the refresh token cookie, not the access token in the Authorization header.
Frontend: After logout succeeds, clear any locally stored access token on the client side.
  • Login - Create a new authenticated session
  • Refresh Token - Rotate the access token using the cookie