> ## 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.

# List organizations for current session

> Returns the organisations the authenticated user belongs to. Called in-process via `auth.api.listOrganizations` so server-to-server requests are not subject to Better Auth's `Origin`-header CSRF check. Cookie-authenticated: NOT part of the public API key / application-id contract.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/avido/openapi.documented.yml get /v0/auth/organizations
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/organizations:
    get:
      tags:
        - Authentication
      summary: List organizations for current session
      description: >-
        Returns the organisations the authenticated user belongs to. Called
        in-process via `auth.api.listOrganizations` so server-to-server requests
        are not subject to Better Auth's `Origin`-header CSRF check.
        Cookie-authenticated: NOT part of the public API key / application-id
        contract.
      operationId: listAuthOrganizations
      responses:
        '200':
          description: Successfully retrieved organizations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationsListResponse'
        '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:
    OrganizationsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Organization'
      required:
        - data
      additionalProperties: false
      title: OrganizationsListResponse
      description: >-
        List of organisations the authenticated user belongs to. Served
        in-process via `auth.api.listOrganizations` to avoid Better Auth's
        Origin CSRF check on the HTTP endpoint (APP-2483).
    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.
    Organization:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        allowDomainAutoJoin:
          type: boolean
        domain:
          type: string
        slug:
          type: string
        logo:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - id
        - name
        - allowDomainAutoJoin
      additionalProperties: false
      title: Organization
      description: >-
        A Better Auth organisation the authenticated user belongs to, normalised
        to the public Avido shape (Prisma-nullable slug/domain surfaced as
        absent rather than null).
  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

````