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

# Update Knowledge Base

> Updates a FAQ knowledge base's title, language and question/answer pairs. The whole knowledge base is re-embedded. To edit a single entry of a document or website knowledge base, use `PUT /knowledgeBase/chunks/update?id={id}` instead.



## OpenAPI

````yaml PUT /knowledgeBase/update?id={id}
openapi: 3.0.1
info:
  title: QCall Ai API
  description: >-
    A sample API that uses a campaign store as an example to demonstrate
    features in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.qcall.ai/api/v1
security:
  - apiKeyAuth: []
paths:
  /knowledgeBase/update?id={id}:
    put:
      description: >-
        Updates a FAQ knowledge base's title, language and question/answer
        pairs. The whole knowledge base is re-embedded. To edit a single entry
        of a document or website knowledge base, use `PUT
        /knowledgeBase/chunks/update?id={id}` instead.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The `hash_id` of the knowledge base to update
      requestBody:
        description: Knowledge base fields to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewKnowledgeBase'
        required: true
      responses:
        '200':
          description: Knowledge base updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether the request succeeded
                  message:
                    type: string
                    description: Response message
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    NewKnowledgeBase:
      required:
        - title
        - language
        - data
      type: object
      properties:
        title:
          description: The title of the knowledge base
          type: string
        language:
          description: Language code (e.g. `en`)
          type: string
        data:
          description: The question/answer pairs of the knowledge base
          type: array
          items:
            $ref: '#/components/schemas/QuestionAnswer'
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    QuestionAnswer:
      required:
        - question
        - answer
      type: object
      properties:
        question:
          description: The question
          type: string
        answer:
          description: The answer to the question
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header

````