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

# Create Knowledge Base

> Creates a new knowledge base for storing and managing documents. A knowledge base serves as a container 
for related documents that can be used by AI agents for context and information retrieval. Each knowledge 
base is isolated and can have its own set of documents, making it ideal for organizing domain-specific 
knowledge.



## OpenAPI

````yaml /api-reference/openapi.json post /v2/knowledge-bases/
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/:
    post:
      tags:
        - Knowledge Bases v2
      summary: Create Knowledge Base
      description: >-
        Creates a new knowledge base for storing and managing documents. A
        knowledge base serves as a container 

        for related documents that can be used by AI agents for context and
        information retrieval. Each knowledge 

        base is isolated and can have its own set of documents, making it ideal
        for organizing domain-specific 

        knowledge.
      operationId: create_knowledge_base_v2_knowledge_bases__post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/app__knowledge_bases_v2__schemas__CreateKnowledgeBaseRequest
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/app__knowledge_bases_v2__schemas__KnowledgeBaseResponse
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    app__knowledge_bases_v2__schemas__CreateKnowledgeBaseRequest:
      properties:
        name:
          type: string
          minLength: 1
          title: Name
          description: >-
            The name of the knowledge base. Must be unique within your
            organization and clearly identify its purpose.
        description:
          type: string
          title: Description
          description: >-
            A comprehensive description of the knowledge base explaining its
            contents, purpose, and how it will be used by AI agents.
        document_language:
          type: string
          title: Document Language
          description: >-
            The language of the documents in the knowledge base. This will be
            used to filter documents by language when adding to the knowledge
            base.
          default: en
      type: object
      required:
        - name
        - description
      title: CreateKnowledgeBaseRequest
      description: Data Transfer Object for creating a new Knowledge Base.
      example:
        description: Knowledge base containing all company policies and procedures
        name: Company Policies
    app__knowledge_bases_v2__schemas__KnowledgeBaseResponse:
      properties:
        _id:
          type: string
          title: Id
          description: Unique identifier of the knowledge base in MongoDB ObjectId format.
        name:
          type: string
          title: Name
          description: The name of the knowledge base.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Detailed description of the knowledge base's purpose and contents.
        document_language:
          type: string
          title: Document Language
          description: >-
            The language of the documents in the knowledge base. This will be
            used to filter documents by language when adding to the knowledge
            base.
          default: en
        document_count:
          type: integer
          title: Document Count
          description: Total number of documents currently stored in this knowledge base.
          default: 0
        created_at:
          type: string
          format: date-time
          title: Created At
          description: UTC timestamp indicating when this knowledge base was created.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: UTC timestamp indicating when this knowledge base was last modified.
        status:
          anyOf:
            - type: string
              enum:
                - processing
                - completed
                - failed
            - type: 'null'
          title: Status
          description: >-
            Status of the knowledge base. 'processing' means documents are being
            processed. 'completed' means all documents are processed and ready.
            'failed' means there was an error in processing the documents.
      type: object
      required:
        - _id
        - name
        - created_at
        - updated_at
      title: KnowledgeBaseResponse
      description: Response model for a Knowledge Base.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````