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

# List your chat workspaces

> Workspaces you belong to, directly or through a realm role, by name.



## OpenAPI

````yaml get /api/chat/workspaces
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/chat/workspaces:
    get:
      tags:
        - Chat
      summary: List your chat workspaces
      description: Workspaces you belong to, directly or through a realm role, by name.
      operationId: list_workspaces_api_chat_workspaces_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ChatWorkspaceResponse'
                type: array
                title: Response List Workspaces Api Chat Workspaces Get
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    ChatWorkspaceResponse:
      properties:
        id:
          type: string
          title: Id
          description: Workspace ID.
        name:
          type: string
          title: Name
          description: Display name.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: What it's for.
        created_by:
          type: string
          title: Created By
          description: Who created it.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When it was created.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When its details last changed.
        your_role:
          $ref: '#/components/schemas/ChatWorkspaceRole'
          description: Your highest role in it, directly or through a realm role.
        instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Instructions
          description: >-
            Standing instructions for the assistant, as Markdown. Added to the
            base prompt, never replacing it, and added to rather than replacing
            any the workspace sets. Cannot change which tools exist or which
            need approval.
        defaults:
          $ref: '#/components/schemas/ChatContextDefaults'
          description: What the assistant reaches for first in this workspace.
      type: object
      required:
        - id
        - name
        - created_by
        - created_at
        - updated_at
        - your_role
      title: ChatWorkspaceResponse
      description: A workspace, with your role in it.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
    ChatWorkspaceRole:
      type: string
      enum:
        - owner
        - editor
        - viewer
      title: ChatWorkspaceRole
      description: What a workspace member can do.
    ChatContextDefaults:
      properties:
        trino_catalog:
          anyOf:
            - type: string
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9 ._:/-]{0,127}$
            - type: 'null'
          title: Trino Catalog
          description: Trino catalog to query unless the user names another.
        trino_schema:
          anyOf:
            - type: string
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9 ._:/-]{0,127}$
            - type: 'null'
          title: Trino Schema
          description: Schema within that catalog.
        datahub_domain:
          anyOf:
            - type: string
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9 ._:/-]{0,127}$
            - type: 'null'
          title: Datahub Domain
          description: DataHub domain to search first.
        decisions_workspace:
          anyOf:
            - type: string
              maxLength: 64
              pattern: ^[A-Za-z0-9][A-Za-z0-9 ._:/-]{0,127}$
            - type: 'null'
          title: Decisions Workspace
          description: Business-rules workspace to author and read rules in.
      type: object
      title: ChatContextDefaults
      description: |-
        What the assistant should reach for first, unless told otherwise.

        Every field names something owned by another system, so none of them
        are checked here — see "Pinned defaults are preferences" in
        `api.services.chat.context`. The portal offers pickers rather than
        free text, which is where a typo is actually prevented.
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.