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

# Add Files Document

> Add a file document to the knowledge base by providing the file and document_type.



## OpenAPI

````yaml /api-reference/openapi.json post /v2/knowledge-bases/{kb_id}/documents/files
openapi: 3.1.0
info:
  title: Verbex Platform API
  description: API for managing AI agents, calls, phone numbers, and more.
  version: 1.0.0
servers: []
security: []
paths:
  /v2/knowledge-bases/{kb_id}/documents/files:
    post:
      tags:
        - Knowledge Bases v2
      summary: Add Files Document
      description: >-
        Add a file document to the knowledge base by providing the file and
        document_type.
      operationId: add_files_document_v2_knowledge_bases__kb_id__documents_files_post
      parameters:
        - name: kb_id
          in: path
          required: true
          schema:
            type: string
            title: Kb Id
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_add_files_document_v2_knowledge_bases__kb_id__documents_files_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddDocumentsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_add_files_document_v2_knowledge_bases__kb_id__documents_files_post:
      properties:
        files:
          items:
            type: string
            format: binary
          type: array
          title: Files
        document_languages:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Document Languages
      type: object
      required:
        - files
      title: Body_add_files_document_v2_knowledge_bases__kb_id__documents_files_post
    AddDocumentsResponse:
      properties:
        processing_status:
          $ref: '#/components/schemas/ProcessingStatus'
          description: >-
            Status information about the document addition process, including
            progress and any errors.
      type: object
      required:
        - processing_status
      title: AddDocumentsResponse
      description: Response model for adding documents to a Knowledge Base.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ProcessingStatus:
      properties:
        status:
          type: string
          enum:
            - processing
            - completed
            - failed
          title: Status
          description: >-
            Current status of document processing: 'processing' while in
            progress, 'completed' when finished successfully, or 'failed' on
            error.
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          description: >-
            Optional message providing more details about the current processing
            status or any errors encountered.
        document_ids:
          items:
            type: string
          type: array
          title: Document Ids
          description: List of document IDs that were processed or are being processed.
          default: []
      type: object
      required:
        - status
      title: ProcessingStatus
      description: Model for document processing status.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````