Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Nyverie/reservafacil/llms.txt

Use this file to discover all available pages before exploring further.

Ends the current user session by deleting the token cookie from the browser. Because ReservaFácil uses stateless JWT authentication, there is no server-side session record to revoke — logging out is achieved entirely by removing the cookie so that subsequent requests no longer carry a credential. No request body or authentication header is needed.

Request

POST /api/auth/logout
This endpoint requires no request body and no Authorization header. The browser’s existing token cookie is deleted regardless of whether it is present or valid.

Response

200 — Success

ok
boolean
Always true. Returned even if no token cookie was present on the request.
The response calls response.cookies.delete('token'), which instructs the browser to immediately expire and remove the cookie. After this response is received, GET /api/auth/me will return 401.

Error Responses

This endpoint does not return application-level errors. Network or infrastructure failures may produce a generic 500 from the hosting platform.

Examples

curl -X POST https://your-app.vercel.app/api/auth/logout \
  -H "Cookie: token=<your-jwt-token>"

Success response body

{
  "ok": true
}

Build docs developers (and LLMs) love