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

# Create Knowledge Base

> Create Knowledge Base



## OpenAPI

````yaml https://api-prod.interactly.ai/api-docs/common/api.json post /kb/v1/knowledge-bases
openapi: 3.1.0
info:
  title: Interactly API
  description: API for building interactly.ai services
  version: 1.1.0
  contact:
    name: Interactly
    url: https://interactly.ai
    email: developers@interactly.ai
servers:
  - url: https://api-prod.interactly.ai
    description: API Server
security: []
paths:
  /kb/v1/knowledge-bases:
    post:
      tags:
        - Knowledge Bases
      summary: Create Knowledge Base
      description: Create Knowledge Base
      operationId: createKnowledgeBase
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  example: My Knowledge Base
                  description: A descriptive and human-readable name for the knowledge base
                description:
                  type: string
                docs:
                  $ref: '#/components/schemas/KnowledgeBaseDocs'
                files:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                retrain_frequency_minutes:
                  type: integer
                  description: >-
                    Automatic retrain interval in minutes. Set
                    retrain_frequency_minutes = 0 to disable automatic
                    retraining. Allowed values: multiples of 60
                  default: 0
                  example: 0
              required:
                - title
      responses:
        '201':
          description: Knowledge Base created successfully
      security:
        - bearer: []
components:
  schemas:
    KnowledgeBaseDocs:
      type: array
      description: Here you can upload URLs
      items:
        type: object
        properties:
          type:
            type: string
            enum:
              - url
          payload:
            type: object
            description: Here you can upload URLs
            properties:
              urls_to_include:
                type: array
                items:
                  $ref: '#/components/schemas/KnowledgeBaseUrl'
              urls_to_exclude:
                type: array
                items:
                  $ref: '#/components/schemas/KnowledgeBaseUrl'
    KnowledgeBaseUrl:
      type: object
      properties:
        url:
          type: string
          description: This is the URL of the Knowledge Base.
          format: uri
        subpaths_only:
          type: boolean
          description: >-
            If subpaths_only is enabled, the crawler only processes URLs that
            are subpaths of the parent URL, ignoring links outside the specified
            path hierarchy.
          default: false
        recursive:
          type: boolean
          description: >-
            If recursive is enabled, the crawler recursively scrapes all URLs
            found on the page, including links to external domains.
          default: false
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: Bearer
      type: http
      description: >-
        Retrieve your API Key from [Dashboard API Keys
        Section](https://dashboard.interactly.ai/api-keys).

````