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

# Logs out the authenticated user by invalidating their current session.



## OpenAPI

````yaml https://raw.githubusercontent.com/FooBarBizarre/docs/refs/heads/main/api-reference/openapi.json post /authentication/logout
openapi: 3.0.1
info:
  title: Maia Backend API
  version: v1
servers: []
security: []
paths:
  /authentication/logout:
    post:
      tags:
        - Authentication
      summary: Logs out the authenticated user by invalidating their current session.
      requestBody:
        description: >-
          The logout request containing options for logout scope (current
          session or all sessions).
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogoutRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/LogoutRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/LogoutRequest'
      responses:
        '200':
          description: User logged out successfully.
        '400':
          description: Invalid session or authentication token.
components:
  schemas:
    LogoutRequest:
      type: object
      properties:
        all:
          type: boolean
      additionalProperties: false

````