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

# List workspaces

> ⚠️ **ALPHA ENDPOINT** - This endpoint is in alpha and subject to breaking changes. Use with caution in production environments.

Get the list of accessible workspaces for the authenticated user. Returns workspaces where the user is set as member (through any group: private, company, or custom). Please use instance or company level endpoints to access the workspaces as admin.

**Filtering:** All users see only workspaces where they are members. Admin users should use `/api/v3/instance/workspaces` or `/api/v3/company/workspaces` for administrative access.

Supported query filters: `workspace_type`, `document_upload_method`, `datasource_type` (`googledrive`, `sharepoint`, `servicenow`, `webscrapper`), `name` (case-insensitive contains), `group_id`, `group_name`, `user_role`.

**API keys:** `scoped_api_keys` lists your own non-revoked keys that can access the workspace. Each entry has a `scope_type`: `workspace` for keys explicitly scoped to it (listed first, with their per-workspace role), or `global` for keys with no scope rows that implicitly reach every workspace (their `role` mirrors your own role on the workspace).

**Taxonomy:** Each workspace includes a `taxonomy` field summarizing content type classification. `classified_files_rate` is the proportion of documents with at least one content type (0-to-1 ratio). `root_content_types` lists top-level content type families with document counts. A workspace holding documents that are all unclassified reports a rate of `0.0` with an empty `root_content_types`; the whole `taxonomy` object is `null` only when the workspace has no documents.

Results ordered by `name` ascending by default — pass `ordering` to change it. Paginated with 20 elements per page by default.



## OpenAPI

````yaml /api-reference/openapi-v3.yaml get /api/v3/workspaces
openapi: 3.1.0
info:
  title: LightOn API
  version: 3.15.0 (v3)
  description: >-
    LightOn gives you an API to search, parse, and ingest documents at scale.
    Build knowledge-retrieval pipelines without managing vector databases or OCR
    models.
servers:
  - url: https://paradigm.lighton.ai
security: []
tags:
  - name: Agents
    description: Operations about agents
  - name: Threads
    description: Operations about agents conversation threads
  - name: Tools
    description: Operations about native tools
  - name: Models
    description: Operations about AI models
  - name: MCP
    description: Operations about MCP servers
  - name: Sources
    description: Operations about sources used by agents conversation threads
  - name: Artifacts
    description: Operations about artifacts generated by agents conversation threads
  - name: Agent
    description: >-
      Operations about agents (deprecated). Please use the 'Agents' API
      component instead.
  - name: Files
    description: Operations about files
  - name: Facets
    description: Operations about facets
  - name: Tags
    description: Operations about tags
  - name: Workspaces
    description: Operations about workspaces
  - name: Files Processing
    description: Operations about files processing
  - name: Users
    description: Operations about users
  - name: API Keys
    description: Operations about API keys
  - name: User Groups
    description: Operations about user groups
  - name: SCIM
    description: Operations about SCIM
paths:
  /api/v3/workspaces:
    get:
      tags:
        - Workspaces
      summary: List workspaces
      description: >-
        ⚠️ **ALPHA ENDPOINT** - This endpoint is in alpha and subject to
        breaking changes. Use with caution in production environments.


        Get the list of accessible workspaces for the authenticated user.
        Returns workspaces where the user is set as member (through any group:
        private, company, or custom). Please use instance or company level
        endpoints to access the workspaces as admin.


        **Filtering:** All users see only workspaces where they are members.
        Admin users should use `/api/v3/instance/workspaces` or
        `/api/v3/company/workspaces` for administrative access.


        Supported query filters: `workspace_type`, `document_upload_method`,
        `datasource_type` (`googledrive`, `sharepoint`, `servicenow`,
        `webscrapper`), `name` (case-insensitive contains), `group_id`,
        `group_name`, `user_role`.


        **API keys:** `scoped_api_keys` lists your own non-revoked keys that can
        access the workspace. Each entry has a `scope_type`: `workspace` for
        keys explicitly scoped to it (listed first, with their per-workspace
        role), or `global` for keys with no scope rows that implicitly reach
        every workspace (their `role` mirrors your own role on the workspace).


        **Taxonomy:** Each workspace includes a `taxonomy` field summarizing
        content type classification. `classified_files_rate` is the proportion
        of documents with at least one content type (0-to-1 ratio).
        `root_content_types` lists top-level content type families with document
        counts. A workspace holding documents that are all unclassified reports
        a rate of `0.0` with an empty `root_content_types`; the whole `taxonomy`
        object is `null` only when the workspace has no documents.


        Results ordered by `name` ascending by default — pass `ordering` to
        change it. Paginated with 20 elements per page by default.
      operationId: api_v3_workspaces_list
      parameters:
        - in: query
          name: datasource_type
          schema:
            type: string
            enum:
              - googledrive
              - servicenow
              - sharepoint
              - webscrapper
          description: |-
            The type of data source.

            * `servicenow` - ServiceNow
            * `googledrive` - Google Drive
            * `sharepoint` - SharePoint
            * `webscrapper` - WebScrapper
        - in: query
          name: document_upload_method
          schema:
            type: string
            enum:
              - manual
              - synced
          description: >-
            Method for adding documents to this workspace: manual uploads or
            synced from datasources


            * `manual` - Manual

            * `synced` - Synced
        - in: query
          name: group_id
          schema:
            type: integer
        - in: query
          name: group_name
          schema:
            type: string
        - in: query
          name: name
          schema:
            type: string
        - in: query
          name: ordering
          schema:
            type: string
            enum:
              - '-created_at'
              - '-name'
              - '-updated_at'
              - created_at
              - name
              - updated_at
          description: >-
            Order the results by `name`, `created_at` or `updated_at`. Prefix
            the field with `-` for descending order (e.g. `-created_at`).
            Defaults to `name`; entries sharing a name are ordered newest-first.
        - name: page
          required: false
          in: query
          description: A page number within the paginated result set.
          schema:
            type: integer
        - name: page_size
          required: false
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
        - in: query
          name: user_role
          schema:
            type: string
            enum:
              - editor
              - owner
              - viewer
          description: |-
            * `owner` - Owner
            * `editor` - Editor
            * `viewer` - Viewer
        - in: query
          name: workspace_type
          schema:
            type: string
            enum:
              - personal
              - public
              - shared
          description: |-
            * `shared` - Shared
            * `personal` - Personal
            * `public` - Public
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PaginatedStandardWorkspaceV3ListResponseList
          description: List of workspaces where the user is a member
        '401':
          description: Unauthenticated - Missing or invalid API key/session cookie
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIV3ValidationErrorResponse'
              examples:
                ValidationError:
                  value:
                    id: null
                    code: 422
                    error: validation_error
                    detail: One or more fields failed validation.
                    doc_url: https://developers.lighton.ai/errors#validation_error
                    fields:
                      <field_name>:
                        - error: required
                          detail: This field is required.
                  summary: Validation Error
          description: Request body is valid JSON but one or more fields failed validation
        '503':
          description: >-
            API is under maintenance. Check `GET /api/v3/system/status` for
            active periods and retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceMaintenance503'
      security:
        - bearerAuth: []
components:
  schemas:
    PaginatedStandardWorkspaceV3ListResponseList:
      type: object
      required:
        - count
        - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/StandardWorkspaceV3ListResponse'
    APIV3ValidationErrorResponse:
      type: object
      properties:
        id:
          type:
            - string
            - 'null'
          description: >-
            Job/resource id when one already exists (useful for async error
            diagnosis); null otherwise.
        code:
          type: integer
          description: HTTP status code
        error:
          type: string
          description: Error code used by the UI as a translation key
        detail:
          type: string
          description: Human-readable error message for developers
        doc_url:
          type: string
          description: Link to the error-code documentation page
        fields:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/APIV3FieldError'
          description: Field-level validation errors keyed by field name
      required:
        - code
        - detail
        - doc_url
        - error
        - id
    ServiceMaintenance503:
      type: object
      description: >-
        Returned by the maintenance middleware when the requested endpoint is
        blocked.
      required:
        - detail
        - error
        - mode
      properties:
        detail:
          type: string
          example: System is under maintenance.
        error:
          type: string
          example: service_maintenance
        mode:
          type: string
          enum:
            - full_shutdown
            - warning_banner
          description: >-
            `full_shutdown` blocks all traffic; `warning_banner` also blocks and
            shows a dismissible toast.
        reason:
          type: string
          description: Operator-supplied maintenance reason, if any.
        started_at:
          type: string
          format: date-time
        endpoint_category_names:
          type: array
          items:
            type: string
          description: >-
            Non-empty only for category-scoped periods. Empty means all
            endpoints are affected.
    StandardWorkspaceV3ListResponse:
      type: object
      description: V3 Response serializer for user-level workspaces endpoint.
      properties:
        id:
          type: integer
        name:
          type: string
        workspace_type:
          type: string
        document_upload_method:
          type: string
        description:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        files_count:
          type: integer
        user_role:
          readOnly: true
          oneOf:
            - $ref: '#/components/schemas/UserRoleEnum'
            - $ref: '#/components/schemas/BlankEnum'
        sync:
          oneOf:
            - $ref: '#/components/schemas/WorkspaceSync'
            - type: 'null'
          readOnly: true
        scoped_api_keys:
          type: array
          items:
            $ref: '#/components/schemas/WorkspaceScopedAPIKey'
          readOnly: true
        taxonomy:
          oneOf:
            - $ref: '#/components/schemas/WorkspaceTaxonomy'
            - type: 'null'
          readOnly: true
      required:
        - created_at
        - description
        - document_upload_method
        - files_count
        - id
        - name
        - scoped_api_keys
        - sync
        - taxonomy
        - updated_at
        - user_role
        - workspace_type
    APIV3FieldError:
      type: object
      properties:
        error:
          type: string
          description: Error code / translation key
        detail:
          type: string
          description: Human-readable description of the field error
      required:
        - detail
        - error
    UserRoleEnum:
      enum:
        - owner
        - editor
        - viewer
      type: string
      description: |-
        * `owner` - owner
        * `editor` - editor
        * `viewer` - viewer
        * `` - 
    BlankEnum:
      enum:
        - ''
    WorkspaceSync:
      type: object
      properties:
        datasource_type:
          type: string
        source_name:
          type: string
        last_status:
          type: string
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
        failed_files_count:
          type: integer
        next_import_date:
          type:
            - string
            - 'null'
          format: date-time
        editable:
          type: boolean
        name:
          type: string
        instance_url:
          type:
            - string
            - 'null'
        tenant_id:
          type: string
        site_name:
          type: string
        client_id:
          type: string
        filter_criteria: {}
      required:
        - client_id
        - datasource_type
        - editable
        - failed_files_count
        - filter_criteria
        - instance_url
        - last_status
        - name
        - next_import_date
        - site_name
        - source_name
        - tenant_id
        - updated_at
    WorkspaceScopedAPIKey:
      type: object
      description: >-
        An API key that can access a single workspace, seen from the workspace
        side.


        Covers both keys explicitly scoped to the workspace
        (`scope_type="workspace"`,

        each carrying its per-workspace role) and the requesting user's
        globally-scoped

        keys (`scope_type="global"`), which implicitly reach every workspace in
        the

        company with the user's own role here. Reads flat dicts built by

        `WorkspaceScopedAPIKeysMixin`, which lists explicitly-scoped keys first.
      properties:
        id:
          type: string
        name:
          type: string
        prefix:
          type: string
        role:
          type: string
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        scope_type:
          $ref: '#/components/schemas/ScopeTypeEnum'
      required:
        - created_at
        - created_by
        - id
        - name
        - prefix
        - role
        - scope_type
    WorkspaceTaxonomy:
      type: object
      properties:
        classified_files_rate:
          type: number
          format: double
        root_content_types:
          type: array
          items:
            $ref: '#/components/schemas/RootContentTypeEntry'
      required:
        - classified_files_rate
        - root_content_types
    ScopeTypeEnum:
      enum:
        - workspace
        - global
      type: string
      description: |-
        * `workspace` - workspace
        * `global` - global
    RootContentTypeEntry:
      type: object
      properties:
        path:
          type: string
        label:
          type: string
        count:
          type: integer
      required:
        - count
        - label
        - path
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````