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

# Retrieve a workspace

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

Retrieve a workspace by ID. Returns workspace in V3 format.

**Access:** Instance-level users (Sys Admin, Account Manager, Admin, DPO Admin) can retrieve any workspace. Company-level users (Company Admin, Company DPO) can retrieve workspaces in their company. Regular users can retrieve workspaces where they are members.

**Member Visibility:** Instance-level users and company-level users see all members. Workspace OWNER sees members. EDITOR and VIEWER do not see members.

**Sync status:** For synced workspaces, the response includes a `sync` block with `datasource_type`, `source_name`, `last_status`, `updated_at`, `failed_files_count`, and `next_import_date`. Use this field for polling the sync state.

Non-existent and unauthorized workspaces are treated identically (existence is not disclosed).



## OpenAPI

````yaml /api-reference/api-console.yaml get /api/v3/workspaces/{id}
openapi: 3.1.0
info:
  title: LightOn API
  version: 3.15.0 (v1)
  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: Ask
    description: >-
      Retrieval-augmented generation: search your indexed corpus and generate an
      LLM answer grounded in the retrieved passages. Supports streaming (SSE)
      and synchronous modes.
  - name: Search
    description: >-
      Hybrid vector + text retrieval over your indexed corpus. Returns ranked
      passages with provenance (file, page range, workspace). Optional reranking
      and vision mode.
  - name: Files
    description: Upload, list, fetch, and delete documents indexed in your workspaces.
  - name: Facets
    description: >-
      Organise documents with hierarchical content types and custom attributes
      per file. Start from starter templates or build your own classification
      schema from scratch.
  - name: Tags
    description: >-
      Manage flat, company-wide labels used to scope search and group content
      across workspaces.
  - name: Workspaces
    description: >-
      Create and manage workspaces — the access-controlled containers your
      documents live in.
  - name: Parse
    description: >-
      Convert documents into structured Markdown — PDFs, images, Office files,
      and HTML. Synchronous endpoint capped at 20 MB / 15 pages.
  - name: Extract
    description: >-
      Pull typed fields out of documents using a JSON Schema you provide. Sync
      mode for small documents (≤20 MB / 15 pages); async mode for larger jobs
      (≤100 MB / 1000 pages) with polling on a job ID.
  - name: API Keys
    description: >-
      Provision and revoke API keys used to authenticate against the Console
      API.
  - name: Budget
    description: >-
      Manage your organization's monthly spend budget and alert thresholds. Set
      a hard cap that blocks API requests when reached, and configure email
      notifications at custom spend percentages.
paths:
  /api/v3/workspaces/{id}:
    get:
      tags:
        - Workspaces
      summary: Retrieve a workspace
      description: >-
        ⚠️ **ALPHA ENDPOINT** - This endpoint is in alpha and subject to
        breaking changes. Use with caution in production environments.


        Retrieve a workspace by ID. Returns workspace in V3 format.


        **Access:** Instance-level users (Sys Admin, Account Manager, Admin, DPO
        Admin) can retrieve any workspace. Company-level users (Company Admin,
        Company DPO) can retrieve workspaces in their company. Regular users can
        retrieve workspaces where they are members.


        **Member Visibility:** Instance-level users and company-level users see
        all members. Workspace OWNER sees members. EDITOR and VIEWER do not see
        members.


        **Sync status:** For synced workspaces, the response includes a `sync`
        block with `datasource_type`, `source_name`, `last_status`,
        `updated_at`, `failed_files_count`, and `next_import_date`. Use this
        field for polling the sync state.


        Non-existent and unauthorized workspaces are treated identically
        (existence is not disclosed).
      operationId: api_v3_workspaces_retrieve
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          description: The unique identifier of the workspace.
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardWorkspaceV3DetailsResponse'
          description: Workspace details retrieved successfully
        '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
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIV3ErrorResponse'
              examples:
                NotFound:
                  value:
                    id: null
                    code: 404
                    error: not_found
                    detail: The requested resource was not found.
                    doc_url: https://developers.lighton.ai/errors#not_found
                  summary: Not Found
          description: The requested resource was not found
        '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:
    StandardWorkspaceV3DetailsResponse:
      type: object
      description: V3 Response serializer for company workspace creation and retrieval.
      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'
        used_storage:
          type: number
          format: double
        summaries:
          type: array
          items:
            $ref: '#/components/schemas/WorkspaceSummary'
          readOnly: true
        sync:
          oneOf:
            - $ref: '#/components/schemas/WorkspaceSync'
            - type: 'null'
          readOnly: true
        scoped_api_keys:
          type: array
          items:
            $ref: '#/components/schemas/WorkspaceScopedAPIKey'
          readOnly: true
      required:
        - created_at
        - description
        - document_upload_method
        - files_count
        - id
        - name
        - scoped_api_keys
        - summaries
        - sync
        - updated_at
        - used_storage
        - user_role
        - workspace_type
    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.
    UserRoleEnum:
      enum:
        - owner
        - editor
        - viewer
      type: string
      description: |-
        * `owner` - owner
        * `editor` - editor
        * `viewer` - viewer
        * `` - 
    BlankEnum:
      enum:
        - ''
    WorkspaceSummary:
      type: object
      properties:
        language:
          type: string
        summary:
          type: string
      required:
        - language
        - summary
    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
    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
    ScopeTypeEnum:
      enum:
        - workspace
        - global
      type: string
      description: |-
        * `workspace` - workspace
        * `global` - global
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````