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

# Logout



## OpenAPI

````yaml /openapi/openapi.yaml post /v2/auth/logout
openapi: 3.0.3
info:
  title: Qanapi
  version: 3.0.0
  description: Secure API with enforced API Key headers. Supports V2 and V3 endpoints.
servers:
  - url: https://{subdomain}.qanapi.cloud/api
    description: The Qanapi API server
    variables:
      subdomain:
        default: ''
        description: Customer-specific subdomain.
security:
  - ApiKeyAuth: []
paths:
  /v2/auth/logout:
    post:
      tags:
        - Authentication and Token Lifecycle
      summary: Logout
      responses:
        '200':
          description: Logged out
          content:
            application/json:
              schema:
                type: object
                properties:
                  user:
                    type: string
                    format: email
                    example: user@example.com
                  message:
                    type: string
                    example: Successfully logged out
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
components:
  responses:
    UnauthorizedError:
      description: Unauthorized - Invalid API Key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            unauthorized:
              $ref: '#/components/examples/unauthorized'
    ForbiddenError:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            forbidden:
              $ref: '#/components/examples/forbidden'
  schemas:
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          example: An error occurred.
  examples:
    unauthorized:
      value:
        message: Unauthenticated.
    forbidden:
      value:
        message: This action is unauthorized.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-qanapi-authorization
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````