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

# Get the current session

> Get the current session



## OpenAPI

````yaml /api/openapi.json get /api/auth/get-session
openapi: 3.1.0
info:
  title: Aquila API
  version: 1.0.0
  description: >-
    Event-driven reconnaissance platform API. All /api/* routes except
    /api/public/* require an authenticated session (cookie), an X-Api-Key
    header, or a bearer token. Auth endpoints under /api/auth/* are generated by
    Better Auth.
servers:
  - url: https://aquila.attaxr.com
  - url: http://localhost
security: []
tags:
  - name: AI
  - name: Agents
  - name: Bulk Delete
  - name: Chat
  - name: Constraints
  - name: Dashboard
  - name: Events
  - name: JS
  - name: JS Analysis
  - name: JS Monitoring
  - name: Leads
  - name: MCP Key
  - name: Models
  - name: Notification Channels
  - name: Notification Event Preferences
  - name: Notifications
  - name: OOB
  - name: Provider Keys
  - name: Public Shares
  - name: Reinforcements
  - name: Reports
  - name: Scans
  - name: Schedules
  - name: Shares
  - name: Tools
  - name: User Profiles
  - name: V1
  - name: Vulnerabilities
  - name: Workflows
paths:
  /api/auth/get-session:
    get:
      tags:
        - Auth
      summary: Get the current session
      description: Get the current session
      operationId: getSession
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type:
                  - object
                  - 'null'
                properties:
                  session:
                    $ref: '#/components/schemas/Session'
                  user:
                    $ref: '#/components/schemas/User'
                required:
                  - session
                  - user
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
          description: >-
            Bad Request. Usually due to missing parameters, or invalid
            parameters.
        '401':
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
          description: Unauthorized. Due to missing or invalid authentication.
        '403':
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
          description: >-
            Forbidden. You do not have permission to access this resource or to
            perform this action.
        '404':
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
          description: Not Found. The requested resource was not found.
        '429':
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
          description: >-
            Too Many Requests. You have exceeded the rate limit. Try again
            later.
        '500':
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
          description: >-
            Internal Server Error. This is a problem with the server that you
            cannot fix.
      security:
        - bearerAuth: []
components:
  schemas:
    Session:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        expiresAt:
          type: string
          format: date-time
        token:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        ipAddress:
          type: string
        userAgent:
          type: string
        userId:
          type: string
        impersonatedBy:
          type: string
          readOnly: true
      required:
        - id
        - expiresAt
        - token
        - createdAt
        - updatedAt
        - userId
    User:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        email:
          type: string
        emailVerified:
          type: boolean
          default: false
          readOnly: true
        image:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        username:
          type: string
        displayUsername:
          type: string
        role:
          type: string
          readOnly: true
        banned:
          type: boolean
          default: false
          readOnly: true
        banReason:
          type: string
          readOnly: true
        banExpires:
          type: string
          format: date-time
          readOnly: true
      required:
        - id
        - name
        - email
        - emailVerified
        - createdAt
        - updatedAt
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Personal API key sent as a bearer token.

````