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

# Upload Document

> Uploads a document and creates a knowledge base from it — the Document Upload tab in the application.

Send the file as `multipart/form-data`. Supported formats are **PDF, DOC, DOCX, ODT and MD**, with a maximum size of **30MB**.

* `title` is optional and defaults to the file name.
* The document is chunked and embedded directly — no FAQ conversion.
* Embeddings are built in the background; poll `GET /knowledgeBase/build-status` until the build is `ready`.


## OpenAPI

````yaml POST /knowledgeBase/upload-embed
openapi: 3.0.1
info:
  title: QCall Ai API
  description: >-
    A sample API that uses a campaign store as an example to demonstrate
    features in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.qcall.ai/api/v1
security:
  - apiKeyAuth: []
paths:
  /knowledgeBase/upload-embed:
    post:
      description: >-
        Uploads a document and creates a knowledge base from it (the **Document
        Upload** tab in the application). The document is chunked and embedded
        directly — no FAQ conversion. Accepted formats are PDF, DOC, DOCX, ODT
        and MD, with a maximum file size of 30MB. The title is optional and
        defaults to the file name. Embeddings are built in the background; poll
        `GET /knowledgeBase/build-status` to track progress.
      requestBody:
        description: >-
          Multipart form with the document file, an optional title and a
          language code
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: The document file (PDF, DOC, DOCX, ODT or MD, max 30MB)
                title:
                  type: string
                  description: Optional title, defaults to the file name
                language:
                  description: Language code (e.g. `en`)
                  type: string
        required: true
      responses:
        '200':
          description: Document uploaded; embedding is building in the background
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether the request succeeded
                  message:
                    type: string
                    description: Response message
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header

````