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

# Create File Document

> Create a knowledge base document generated from the uploaded file.



## OpenAPI

````yaml https://api.threetone.in/openapi.json post /v1/voiceai/knowledge-base/file
openapi: 3.1.0
info:
  title: Threetone API Documentation
  version: 1.0.0
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/voiceai/knowledge-base/file:
    post:
      tags:
        - Knowledge Base
      summary: Create File Document
      description: Create a knowledge base document generated from the uploaded file.
      operationId: create_file_document_route
      parameters:
        - name: name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Name
        - name: parent_folder_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Parent Folder Id
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_create_file_document_route'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddKnowledgeBaseResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    Body_create_file_document_route:
      properties:
        file:
          type: string
          contentMediaType: application/octet-stream
          title: File
      type: object
      required:
        - file
      title: Body_create_file_document_route
    AddKnowledgeBaseResponseModel:
      properties:
        id:
          type: string
          title: Id
          description: The ID of the created document
        name:
          type: string
          title: Name
          description: The name of the created document
        folder_path:
          items:
            $ref: '#/components/schemas/KnowledgeBaseFolderPathSegmentResponseModel'
          type: array
          title: Folder Path
          description: >-
            The folder path segments leading to this entity, from root to parent
            folder.
      type: object
      required:
        - id
        - name
      title: AddKnowledgeBaseResponseModel
      description: |-
        Response model for all document creation endpoints (URL, text, file).
        Returns the created document's ID, name, and folder path.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    KnowledgeBaseFolderPathSegmentResponseModel:
      properties:
        id:
          type: string
          title: Id
          description: Folder ID
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Folder name
      type: object
      required:
        - id
      title: KnowledgeBaseFolderPathSegmentResponseModel
      description: Folder path segment for hierarchical navigation
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: API key for programmatic access
      in: header
      name: x-api-key
    HTTPBearer:
      type: http
      description: JWT Bearer token for dashboard access
      scheme: bearer

````