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

# Get current session

> Returns the currently authenticated session for cookie-based callers. Used by the apps/app frontend to centralise session validation through the API rather than calling Better Auth directly. Authenticated by Better Auth session cookie on the parent domain — NOT by API key / application id like the rest of the v0 API.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/avido/openapi.documented.yml get /v0/auth/session
openapi: 3.1.1
info:
  title: Avido API
  description: >-
    Avido's API for LLM usage events, tool calls, trace management, webhook
    validation, and more. See each endpoint's request/response schema for
    details.
  version: 0.1.0
  contact:
    name: Avido Support
    email: support@avidoai.com
    url: https://avidoai.com/support
servers:
  - url: https://api.avidoai.com
    description: Production API
security:
  - ApiKey: []
    ApplicationId: []
paths:
  /v0/auth/session:
    get:
      tags:
        - Authentication
      summary: Get current session
      description: >-
        Returns the currently authenticated session for cookie-based callers.
        Used by the apps/app frontend to centralise session validation through
        the API rather than calling Better Auth directly. Authenticated by
        Better Auth session cookie on the parent domain — NOT by API key /
        application id like the rest of the v0 API.
      operationId: getAuthSession
      responses:
        '200':
          description: Successfully retrieved the current session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthSessionResponse'
        '401':
          description: No valid session present
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security: []
components:
  schemas:
    AuthSessionResponse:
      type: object
      properties:
        user:
          type: object
          properties:
            id:
              type: string
            email:
              type: string
            firstName:
              type: string
            lastName:
              type: string
            profilePictureUrl:
              type: string
            banned:
              type: boolean
          required:
            - id
            - email
            - firstName
            - lastName
            - profilePictureUrl
            - banned
          additionalProperties: false
        orgId:
          anyOf:
            - type: string
            - type: 'null'
        accessToken:
          type: string
      required:
        - user
        - orgId
        - accessToken
      additionalProperties: false
      title: AuthSessionResponse
      description: >-
        The currently authenticated session: user profile, active organization
        id (nullable for brand-new OAuth sign-ups), and session access token.
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable error message explaining the error.
          example: Resource not found
      required:
        - message
      additionalProperties: false
      title: ErrorResponse
      description: Standard error format for failed API operations.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your unique Avido API key
    ApplicationId:
      type: apiKey
      in: header
      name: x-application-id
      description: Your unique Avido Application ID

````