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

# Update Knowledge Base

> Update Knowledge Base



## OpenAPI

````yaml https://api-prod.interactly.ai/api-docs/common/api.json put /kb/v1/knowledge-bases/{id}
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/{id}:
    put:
      tags:
        - Knowledge Bases
      summary: Update Knowledge Base
      description: Update Knowledge Base
      operationId: updateKnowledgeBase
      parameters:
        - name: id
          description: Knowledge Base ID
          required: true
          in: path
          schema:
            type: string
          example: 5f7b1b1b1b1b1b1b1b1b1b1b
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeBaseUpdateDTO'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeBaseDTO'
        '404':
          description: The provided knowledge base ID does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Knowledge base not found
      security:
        - bearer: []
components:
  schemas:
    KnowledgeBaseUpdateDTO:
      type: object
      properties:
        title:
          type: string
          example: Knowledge Base Title
          description: This is the title of the Knowledge Base.
        description:
          type: string
          example: Knowledge Base Description
        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: 1440
        docs:
          $ref: '#/components/schemas/KnowledgeBaseDocs'
        files:
          type: array
          description: List of Files to be associated with the Knowledge Base.
          items:
            type: object
            properties:
              id:
                type: string
                example: 5f7b1b1b1b1b1b1b1b1b1b1b
    KnowledgeBaseDTO:
      type: object
      properties:
        id:
          type: string
          example: 5f7b1b1b1b1b1b1b1b1b1b1b
        title:
          type: string
          example: Knowledge Base Title
          description: This is the title of the Knowledge Base.
        description:
          type: string
          example: Knowledge Base Description
        status:
          type: string
          example: trained
          enum:
            - draft
            - created
            - queued
            - training
            - trained
        docs:
          $ref: '#/components/schemas/KnowledgeBaseDocs'
        files:
          type: array
          items:
            $ref: '#/components/schemas/FileResponse'
    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'
    FileResponse:
      type: object
      properties:
        id:
          type: string
          example: 5f7b1b1b1b1b1b1b1b1b1b1b
        name:
          type: string
          example: some_file.json
        type:
          type: string
          example: file
        createdAt:
          $ref: '#/components/schemas/CreatedAt'
        updatedAt:
          $ref: '#/components/schemas/UpdatedAt'
    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
    CreatedAt:
      type: string
      format: date-time
      description: This is the ISO 8601 date-time string of when the record was created.
      example: '2020-10-05T00:00:00.000Z'
    UpdatedAt:
      type: string
      format: date-time
      description: >-
        This is the ISO 8601 date-time string of when the record was last
        updated.
      example: '2020-10-05T00:00:00.000Z'
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: Bearer
      type: http
      description: >-
        Retrieve your API Key from [Dashboard API Keys
        Section](https://dashboard.interactly.ai/api-keys).

````