> ## 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.

# List content types

> List your classification trees: the content types you've adopted
from the starter templates or created from scratch. This is where you see
what's available to classify your documents with.

**Content types are tree-based.** Each tree is an independent classification
hierarchy (e.g., `legal` → `contract` → `nda`). You can have multiple trees
side by side (`legal`, `finance`, `compliance`), and a single document can be
classified under **multiple trees** simultaneously. For instance, a contract
can be both `legal:contract:nda` and `finance:investment:term-sheet`.

Each node in the tree can carry **custom attributes** (metadata fields like
`jurisdiction`, `effective_date`, `contract_value`). Attributes are inherited
down the tree: a document at `legal:contract:nda` gets attributes from all
three levels.

**New here?** Start by browsing available templates at
`GET /api/v3/content-types/templates`, then adopt the ones you need
via `POST /api/v3/content-types {"action": "adopt"}`.

**Query params:**
- `?query=5G antennas`: filter to content types relevant to a search query
  (uses a first-pass retrieval). Without this param, the full catalog is returned.
- `?path=legal`: filter to a specific subtree
- `?path=legal,finance`: multiple subtrees (comma-separated)
- `?depth=0`: roots only. `?depth=N`: N levels of children.
- `?include_attributes=true` (default): include attribute definitions per node
- `?include_attributes=false`: omit attribute definitions for a lighter response

`query` and `path` can be combined: returns the intersection (only matched
content types under the requested paths).

Returns an empty list if no content types have been set up yet.



## OpenAPI

````yaml /api-reference/api-console.yaml get /api/v3/content-types
openapi: 3.1.0
info:
  title: LightOn API
  version: 3.12.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/content-types:
    get:
      tags:
        - Facets
      summary: List content types
      description: >-
        List your classification trees: the content types you've adopted

        from the starter templates or created from scratch. This is where you
        see

        what's available to classify your documents with.


        **Content types are tree-based.** Each tree is an independent
        classification

        hierarchy (e.g., `legal` → `contract` → `nda`). You can have multiple
        trees

        side by side (`legal`, `finance`, `compliance`), and a single document
        can be

        classified under **multiple trees** simultaneously. For instance, a
        contract

        can be both `legal:contract:nda` and `finance:investment:term-sheet`.


        Each node in the tree can carry **custom attributes** (metadata fields
        like

        `jurisdiction`, `effective_date`, `contract_value`). Attributes are
        inherited

        down the tree: a document at `legal:contract:nda` gets attributes from
        all

        three levels.


        **New here?** Start by browsing available templates at

        `GET /api/v3/content-types/templates`, then adopt the ones you need

        via `POST /api/v3/content-types {"action": "adopt"}`.


        **Query params:**

        - `?query=5G antennas`: filter to content types relevant to a search
        query
          (uses a first-pass retrieval). Without this param, the full catalog is returned.
        - `?path=legal`: filter to a specific subtree

        - `?path=legal,finance`: multiple subtrees (comma-separated)

        - `?depth=0`: roots only. `?depth=N`: N levels of children.

        - `?include_attributes=true` (default): include attribute definitions
        per node

        - `?include_attributes=false`: omit attribute definitions for a lighter
        response


        `query` and `path` can be combined: returns the intersection (only
        matched

        content types under the requested paths).


        Returns an empty list if no content types have been set up yet.
      operationId: api_v3_content_types_retrieve
      parameters:
        - in: query
          name: depth
          schema:
            type: integer
          description: Tree depth limit. Omitted = full tree. 0 = roots only.
        - in: query
          name: include_attributes
          schema:
            type: boolean
          description: 'Include attribute definitions per content type node. Default: true.'
        - in: query
          name: path
          schema:
            type: string
          description: Content type path(s) to filter (comma-separated).
        - in: query
          name: query
          schema:
            type: string
          description: >-
            When provided, filter the catalog to content types found in a
            first-pass retrieval for this query. Without this parameter, the
            full company catalog is returned (existing behavior).
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentTypesListResponse'
              examples:
                CompanyContentTypes(default,WithAttributes):
                  value:
                    content_types:
                      - path: legal
                        code: legal
                        label: Legal
                        description: 'Legal documents: contracts, litigation, compliance.'
                        inherit_attributes: true
                        attributes:
                          - name: jurisdiction
                            label: Jurisdiction
                            type: multi-select
                            required: false
                            description: Legal jurisdiction(s) governing the document
                            choices:
                              - FR
                              - US
                              - UK
                              - DE
                          - name: confidentiality_level
                            label: Confidentiality Level
                            type: select
                            required: false
                            description: ''
                            choices:
                              - Public
                              - Internal
                              - Confidential
                              - Strictly Confidential
                        children:
                          - path: legal:contract
                            code: contract
                            label: Contract
                            description: Binding agreements between parties.
                            inherit_attributes: true
                            attributes:
                              - name: jurisdiction
                                label: Jurisdiction
                                type: multi-select
                                required: false
                                description: Legal jurisdiction(s) governing the document
                                choices:
                                  - FR
                                  - US
                                  - UK
                                  - DE
                                inherited: true
                              - name: effective_date
                                label: Effective Date
                                type: date
                                required: false
                                description: ''
                                choices: []
                            children:
                              - path: legal:contract:nda
                                code: nda
                                label: Non-Disclosure Agreement
                                description: ''
                                inherit_attributes: true
                                attributes:
                                  - name: jurisdiction
                                    label: Jurisdiction
                                    type: multi-select
                                    required: false
                                    description: >-
                                      Legal jurisdiction(s) governing the
                                      document
                                    choices:
                                      - FR
                                      - US
                                      - UK
                                      - DE
                                    inherited: true
                                  - name: effective_date
                                    label: Effective Date
                                    type: date
                                    required: false
                                    description: ''
                                    choices: []
                                    inherited: true
                                  - name: counterparty
                                    label: Counterparty
                                    type: text
                                    required: true
                                    description: Name of the other party
                                    choices: []
                                  - name: is_mutual
                                    label: Is Mutual
                                    type: boolean
                                    required: false
                                    description: ''
                                    choices: []
                    can_edit: true
                  summary: Company content types (default, with attributes)
                  description: >-
                    Full tree with attribute definitions per node. Children
                    nested recursively.
                WithoutAttributes(?includeAttributes=false):
                  value:
                    content_types:
                      - path: legal
                        code: legal
                        label: Legal
                        description: 'Legal documents: contracts, litigation, compliance.'
                        inherit_attributes: true
                        children:
                          - path: legal:contract
                            code: contract
                            label: Contract
                            description: Binding agreements between parties.
                            inherit_attributes: true
                    can_edit: true
                  summary: Without attributes (?include_attributes=false)
                  description: >-
                    Lighter response, tree structure only, no attribute
                    definitions.
          description: Company content type tree with optional attribute definitions.
        '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
      security:
        - bearerAuth: []
components:
  schemas:
    ContentTypesListResponse:
      properties:
        content_types:
          items:
            $ref: '#/components/schemas/ContentTypeNodeResponse'
          title: Content Types
          type: array
        can_edit:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Can Edit
      required:
        - content_types
      title: ContentTypesListResponse
      type: object
    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
    ContentTypeNodeResponse:
      properties:
        path:
          title: Path
          type: string
        code:
          title: Code
          type: string
        label:
          title: Label
          type: string
        description:
          default: ''
          title: Description
          type: string
        source:
          title: Source
          type: string
        inherit_attributes:
          default: true
          title: Inherit Attributes
          type: boolean
        attributes:
          default: []
          items:
            $ref: '#/components/schemas/AttributeDefResponse'
          title: Attributes
          type: array
        children:
          default: []
          items:
            $ref: '#/components/schemas/ContentTypeNodeResponse'
          title: Children
          type: array
      required:
        - path
        - code
        - label
        - source
      title: ContentTypeNodeResponse
      type: object
    AttributeDefResponse:
      properties:
        name:
          title: Name
          type: string
        label:
          title: Label
          type: string
        type:
          title: Type
          type: string
        required:
          title: Required
          type: boolean
        description:
          default: ''
          title: Description
          type: string
        choices:
          default: []
          items:
            type: string
          title: Choices
          type: array
      required:
        - name
        - label
        - type
        - required
      title: AttributeDefResponse
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````