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

# Index knowledge document

> Runs converter, chunking, and embeddings for a document. Requires L0 authorization.



## OpenAPI

````yaml POST /api/v1/knowledge/documents/{id}/index
openapi: 3.1.0
info:
  title: FamilyCo API
  description: Core and Knowledge endpoints from the FamilyCo Fastify server.
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: http://127.0.0.1:4000
    description: Local development server
security:
  - bearerAuth: []
tags:
  - name: Core
    description: Infrastructure and runtime status endpoints.
  - name: Auth
    description: Token and API key related endpoints.
  - name: Knowledge
    description: Document upload, indexing, and retrieval endpoints.
paths:
  /api/v1/knowledge/documents/{id}/index:
    post:
      tags:
        - Knowledge
      summary: Index knowledge document
      description: >-
        Runs converter, chunking, and embeddings for a document. Requires L0
        authorization.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeIndexRequest'
      responses:
        '201':
          description: Indexing completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeIndexResponse'
        '400':
          description: Validation or indexing error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    KnowledgeIndexRequest:
      type: object
      properties:
        commandId:
          type: string
          minLength: 1
        maxChars:
          type: integer
          minimum: 400
          maximum: 4000
        overlapChars:
          type: integer
          minimum: 0
          maximum: 1600
    KnowledgeIndexResponse:
      type: object
      required:
        - document
        - chunkCount
        - embeddingModel
      properties:
        document:
          $ref: '#/components/schemas/KnowledgeDocumentItem'
        chunkCount:
          type: integer
        embeddingModel:
          type: string
    ErrorResponse:
      type: object
      required:
        - statusCode
        - code
        - message
      properties:
        statusCode:
          type: integer
        code:
          type: string
        message:
          type: string
    KnowledgeDocumentItem:
      type: object
      required:
        - id
        - name
        - fileType
        - source
        - projectId
        - version
        - status
        - checksum
        - filePath
        - markdownPath
        - converterCommand
        - converterMeta
        - errorMessage
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
        name:
          type: string
        fileType:
          type: string
        source:
          type: string
        projectId:
          type:
            - string
            - 'null'
        version:
          type: integer
        status:
          $ref: '#/components/schemas/KnowledgeDocumentStatus'
        checksum:
          type: string
        filePath:
          type: string
        markdownPath:
          type:
            - string
            - 'null'
        converterCommand:
          type:
            - string
            - 'null'
        converterMeta:
          type:
            - object
            - 'null'
          additionalProperties: true
        errorMessage:
          type:
            - string
            - 'null'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    KnowledgeDocumentStatus:
      type: string
      enum:
        - uploaded
        - indexing
        - indexed
        - failed
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````