> ## 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 in your company

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

Get the list of all workspaces within the authenticated user's company.



## OpenAPI

````yaml /api-reference/openapi-v3-company.yaml get /api/v3/company/workspaces
openapi: 3.1.0
info:
  title: LightOn API
  version: 3.15.0 (v3-company)
  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: Models
    description: Operations about AI models
  - name: Workspaces
    description: Operations about workspaces
  - name: Users
    description: Operations about users
  - name: User Groups
    description: Operations about user groups
  - name: Companies
    description: Operations about companies
paths:
  /api/v3/company/workspaces:
    get:
      tags:
        - Workspaces
      summary: List workspaces in your company
      description: >-
        ⚠️ **ALPHA ENDPOINT** - This endpoint is in alpha and subject to
        breaking changes. Use with caution in production environments.


        Get the list of all workspaces within the authenticated user's company.
      operationId: api_v3_company_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: 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/PaginatedCompanyWorkspaceV3ListResponseList
          description: List of workspaces in the user's company
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIV3ErrorResponse'
              examples:
                Unauthorized:
                  value:
                    id: null
                    code: 401
                    error: unauthorized
                    detail: >-
                      Authentication credentials were not provided or are
                      invalid.
                    doc_url: https://developers.lighton.ai/errors#unauthorized
          description: Authentication credentials were not provided or are invalid
        '403':
          description: Permission denied - insufficient rights to access company workspaces
        '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:
    PaginatedCompanyWorkspaceV3ListResponseList:
      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/CompanyWorkspaceV3ListResponse'
    APIV3ErrorResponse:
      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
      required:
        - code
        - detail
        - doc_url
        - error
        - id
    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.
    CompanyWorkspaceV3ListResponse:
      type: object
      description: V3 Response serializer for company-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
      required:
        - created_at
        - description
        - document_upload_method
        - files_count
        - id
        - name
        - sync
        - 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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````