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

# Switch active organization



## OpenAPI

````yaml https://api.crosmos.dev/openapi.json post /api/v1/auth/active-org
openapi: 3.1.0
info:
  title: Crosmos API
  version: 0.1.0
servers:
  - url: /
security: []
paths:
  /api/v1/auth/active-org:
    post:
      tags:
        - auth
      summary: Switch active organization
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetActiveOrgRequest'
      responses:
        '200':
          description: New access token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetActiveOrgResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
      security:
        - bearerAuth: []
components:
  schemas:
    SetActiveOrgRequest:
      type: object
      properties:
        org_id:
          type: string
          format: uuid
      required:
        - org_id
    SetActiveOrgResponse:
      type: object
      properties:
        access_token:
          type: string
        active_org_id:
          type: string
          format: uuid
      required:
        - access_token
        - active_org_id
    ErrorBody:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: JWT access token or API key (csk_...)

````