> ## 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 of a company

> This endpoint allows you to create a workspace within a specific company.

This is useful for organizing and managing different projects or groups within the company.

It is restricted to admin and company admin users.



## OpenAPI

````yaml /api-reference/openapi-v2.yaml get /api/v2/companies/{id}/workspaces/
openapi: 3.1.0
info:
  title: LightOn API
  version: 3.15.0 (v2)
  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://api.lighton.ai
security: []
tags:
  - name: Files Search
    description: Operations about files search
  - name: Models
    description: Operations about AI models
  - name: Files
    description: Operations about files
  - name: Workspaces
    description: Operations about workspaces
  - name: Upload Sessions
    description: Operations about upload sessions
  - name: Users
    description: Operations about users
  - name: Companies
    description: Operations about companies
  - name: SCIM
    description: Operations about SCIM
  - name: Feedbacks
    description: Operations about feedbacks
  - name: Reporting
    description: Operations about reporting
  - name: Platform Status
    description: Operations about platform status
paths:
  /api/v2/companies/{id}/workspaces/:
    get:
      tags:
        - Workspaces
      summary: List workspaces of a company
      description: >-
        This endpoint allows you to create a workspace within a specific
        company.


        This is useful for organizing and managing different projects or groups
        within the company.


        It is restricted to admin and company admin users.
      operationId: api_v2_companies_workspaces_list
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          description: The unique identifier of the company.
          required: true
        - name: page
          required: false
          in: query
          description: A page number within the paginated result set.
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCompanyWorkspaceResponseList'
          description: ''
      security:
        - bearerAuth: []
components:
  schemas:
    PaginatedCompanyWorkspaceResponseList:
      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/CompanyWorkspaceResponse'
    CompanyWorkspaceResponse:
      type: object
      description: Mixin providing get_membership_role method for workspace serializers.
      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
        summaries:
          type: array
          items:
            $ref: '#/components/schemas/WorkspaceSummaryResponse'
        user_role:
          type:
            - string
            - 'null'
          description: >-
            Return the user's highest role in the workspace (owner, editor,
            viewer) or None if not a member.


            When a user is a member of the workspace through multiple groups
            (e.g., their private group

            and a company group), this returns the highest role among all their
            memberships.

            Role hierarchy: owner > editor > viewer
          readOnly: true
      required:
        - created_at
        - description
        - document_upload_method
        - id
        - name
        - summaries
        - updated_at
        - user_role
        - workspace_type
    WorkspaceSummaryResponse:
      type: object
      properties:
        language:
          type: string
        summary:
          type: string
      required:
        - language
        - summary
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````