> ## Documentation Index
> Fetch the complete documentation index at: https://docs.urban-things.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Logout

## Overview

Logout from the current session by invalidating the authentication token.

## Authorization

* User must be authenticated with a valid Bearer token

## Token Invalidation

* The current token is immediately invalidated
* The token cannot be used for future requests
* Other active sessions remain valid

## Example Usage

```bash theme={null}
curl -X POST \
  https://faisalshop.mvp-apps.ae/api/v2/admin/logout \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

```javascript theme={null}
await axios.post(
  '/api/v2/admin/logout',
  {},
  {
    headers: {
      Authorization: `Bearer ${token}`
    }
  }
);

// Clear token from local storage
localStorage.removeItem('auth_token');
```

## Security Best Practices

* Always logout when done using the application
* Clear tokens from client-side storage
* Implement automatic logout on token expiration


## OpenAPI

````yaml POST /api/v2/admin/logout
openapi: 3.1.0
info:
  title: Urban Things API
  description: Multi-tenant e-commerce platform API
  version: 2.0.0
  contact:
    email: info@faisalkc.com
servers:
  - url: https://faisalshop.mvp-apps.ae
    description: Production server
  - url: http://localhost:3000
    description: Development server
security:
  - bearerAuth: []
paths:
  /api/v2/admin/logout:
    post:
      tags:
        - Authentication
      summary: Logout current session
      responses:
        '200':
          description: Logged out successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Logged out successfully
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````