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

# Put v2useractive org

> Set the active organization for the current session



## OpenAPI

````yaml /api-reference/swagger.yml put /v2/user/active-org
openapi: 3.0.0
info:
  version: 1.0.0
  title: Prisme.ai APIs
  description: Prisme.ai APIs specifications
  termsOfService: https://www.prisme.ai/mentions-legales
  contact:
    name: Prisme.ai Support Team
    email: support@prisme.ai
    url: https://www.prisme.ai
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.eda.prisme.ai
  - url: http://localhost:3001
security:
  - BearerAuth: []
  - WorkspaceApiKeyAuth: []
  - BearerAuth: []
    WorkspaceApiKeyAuth: []
paths:
  /v2/user/active-org:
    put:
      tags:
        - API Gateway
      description: Set the active organization for the current session
      operationId: setActiveOrg
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - orgSlug
              properties:
                orgSlug:
                  type: string
      responses:
        '200':
          description: Success — returns updated org details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserOrgDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
components:
  schemas:
    UserOrgDetails:
      type: object
      properties:
        org:
          type: object
          nullable: true
          properties:
            slug:
              type: string
            name:
              type: string
            status:
              type: string
            branding:
              type: object
              additionalProperties: true
            navigation:
              $ref: '#/components/schemas/Navigation'
            role:
              type: object
              properties:
                slug:
                  type: string
                name:
                  type: string
                permissions:
                  type: array
                  items:
                    type: string
                scopes:
                  type: array
                  items:
                    type: string
            groups:
              type: array
              items:
                type: string
            settings:
              type: object
              additionalProperties: true
            subscription:
              $ref: '#/components/schemas/OrgSubscription'
        permissions:
          type: array
          items:
            type: string
        organizations:
          type: array
          items:
            type: object
            properties:
              slug:
                type: string
              name:
                type: string
              roleSlug:
                type: string
              groups:
                type: array
                items:
                  type: string
    AuthenticationError:
      type: object
      properties:
        error:
          type: string
          example: AuthenticationError
        message:
          type: string
          example: Unauthenticated
    ForbiddenError:
      type: object
      properties:
        error:
          type: string
          example: ForbiddenError
        message:
          type: string
          example: Forbidden
    Navigation:
      type: object
      description: Organization navigation configuration
      properties:
        version:
          type: integer
          description: Schema version number
        homePage:
          type: string
          description: >-
            Route to use as home page (e.g., "/apps/agent-factory"). Must be a
            valid relative path starting with /. If not set, defaults to the
            platform default (SecureChat).
          pattern: ^\/[a-zA-Z0-9\-_\/]*$
        menu:
          type: array
          description: Main menu items
          items:
            $ref: '#/components/schemas/NavigationItem'
        footer:
          type: array
          description: Footer menu items
          items:
            $ref: '#/components/schemas/NavigationItem'
        quickActions:
          type: array
          description: Quick action buttons
          items:
            $ref: '#/components/schemas/NavigationItem'
    OrgSubscription:
      type: object
      required:
        - slug
        - name
        - tier
        - status
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        tier:
          type: string
        plan:
          type: string
        status:
          type: string
          enum:
            - active
            - inactive
            - trialing
            - past_due
            - canceled
        isDefault:
          type: boolean
        limits:
          type: object
          additionalProperties: true
        features:
          type: object
          additionalProperties: true
        billing:
          type: object
          additionalProperties: true
        startedAt:
          type: string
        expiresAt:
          type: string
        createdBy:
          type: string
        updatedBy:
          type: string
        createdAt:
          type: string
        updatedAt:
          type: string
    NavigationItem:
      type: object
      description: Menu item in the navigation structure
      required:
        - id
        - type
      properties:
        id:
          type: string
          description: Unique identifier for this menu item
        type:
          type: string
          enum:
            - category
            - item
            - divider
        label:
          type: string
          description: Display label (not required for dividers)
        icon:
          type: string
          description: Icon name (from lucide-react)
        color:
          type: string
          description: Icon color (CSS color value)
        href:
          type: string
          description: Link destination (for type=item)
        target:
          type: string
          enum:
            - _self
            - _blank
          description: Link target
        expanded:
          type: boolean
          description: Whether category is expanded by default
        badge:
          type: string
          description: Badge text to show (e.g., "New", "Beta")
        permissions:
          type: array
          description: Permissions required to see this item
          items:
            type: string
        features:
          type: array
          description: Features attached to this item
          items:
            $ref: '#/components/schemas/NavigationFeature'
        visibility:
          type: object
          description: Visibility rules for subscription tiers/features
          properties:
            tiers:
              type: array
              items:
                type: string
            features:
              type: array
              items:
                type: string
        items:
          type: array
          description: Child items (for type=category)
          items:
            $ref: '#/components/schemas/NavigationItem'
    NavigationFeature:
      type: object
      description: Feature attached to a navigation item (agent or template)
      required:
        - type
        - slug
        - label
      properties:
        type:
          type: string
          enum:
            - agent
            - template
        slug:
          type: string
          description: Unique identifier for this feature within the menu item
        label:
          type: string
          description: Display label for the feature
        agentId:
          type: string
          description: Agent ID (required when type=agent)
        templateId:
          type: string
          description: Template ID (required when type=template)
        permissions:
          type: array
          description: Permissions required to see this feature
          items:
            type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    WorkspaceApiKeyAuth:
      type: apiKey
      in: header
      name: x-prismeai-api-key

````