--- method: POST path: /api/auth/logout auth: none area: authentication --- # Logout User Invalidate the current JWT token. **Endpoint**: `POST /api/auth/logout` **Auth**: Required **Content-Type**: `application/json` ## Request Headers | Header | Type | Required | Description | | ------------- | ------ | -------- | --------------------------------------- | | Authorization | string | Yes | Bearer token (e.g., `Bearer eyJhbG...`) | ### Example Request ```http POST /api/auth/logout Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... ``` ## Response (200 OK) ```json example-response { "message": "logged out successfully" } ``` ## Error Responses | Code | Description | | ---- | ------------------------- | | 401 | Invalid or expired token | | 403 | Token already invalidated |