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

# Upload a document to the knowledge base



## OpenAPI

````yaml /openapi.json post /api/knowledge-bases/{kbId}/documents
openapi: 3.0.0
info:
  title: GoMobile Backend API
  description: >-
    API documentation for GoMobile telephony platform - automated calling
    campaigns, interactive voice flows, and call management
  version: '1.0'
  contact: {}
servers:
  - url: http://localhost:3000
    description: Local Development
security: []
tags:
  - name: Organizations
    description: Multi-tenant organization management
  - name: Teams
    description: Team structure and hierarchy
  - name: Contacts
    description: Customer contact management (CRM)
  - name: Entities
    description: Business entities management
  - name: Audiences
    description: Contact segmentation and groups
  - name: Programs
    description: Call campaign configuration
  - name: Call Flows
    description: Interactive call flow builder
paths:
  /api/knowledge-bases/{kbId}/documents:
    post:
      tags:
        - Knowledge Base
      summary: Upload a document to the knowledge base
      operationId: DocumentController_upload
      parameters:
        - name: kbId
          required: true
          in: path
          description: Knowledge base ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadDocumentDto'
      responses:
        '202':
          description: Document accepted for processing
        '400':
          description: Invalid file or data
        '404':
          description: Knowledge base not found
      security:
        - bearer: []
components:
  schemas:
    UploadDocumentDto:
      type: object
      properties:
        documentGroup:
          type: string
          description: Document group for organizing documents within a knowledge base
          maxLength: 100
          default: default
          example: product-docs
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````