> ## 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.

# Create a new knowledge base



## OpenAPI

````yaml /openapi.json post /api/knowledge-bases
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:
    post:
      tags:
        - Knowledge Base
      summary: Create a new knowledge base
      operationId: KnowledgeBaseController_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKnowledgeBaseDto'
      responses:
        '201':
          description: Knowledge base created successfully
        '400':
          description: Invalid input data
      security:
        - bearer: []
components:
  schemas:
    CreateKnowledgeBaseDto:
      type: object
      properties:
        name:
          type: string
          description: Knowledge base name
          minLength: 1
          maxLength: 128
          example: Product Documentation
        description:
          type: string
          description: Knowledge base description
          maxLength: 2000
        embeddingModel:
          type: string
          description: Embedding model identifier
          example: openai/text-embedding-3-small
        chunkConfig:
          description: Chunk configuration
          allOf:
            - $ref: '#/components/schemas/ChunkConfigDto'
      required:
        - name
    ChunkConfigDto:
      type: object
      properties:
        strategy:
          type: string
          description: Chunking strategy
          enum:
            - recursive
            - sliding_window
          default: recursive
        size:
          type: number
          description: Chunk size in characters
          minimum: 100
          maximum: 2000
          default: 512
        overlap:
          type: number
          description: Chunk overlap in characters
          minimum: 0
          maximum: 500
          default: 50
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````