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

> Updates a single entry (question/answer pair or text chunk) of a knowledge base. Only that entry is re-embedded, so this is cheaper than re-embedding the whole knowledge base.

Updates a single entry (question/answer pair or text chunk) of a knowledge base. Only that entry is re-embedded, so this is cheaper than updating the whole knowledge base.


## OpenAPI

````yaml PUT /knowledgeBase/chunks/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/chunks/update?id={id}:
    put:
      description: >-
        Updates a single entry (question/answer pair or text chunk) of a
        knowledge base. Only that entry is re-embedded, so this is cheaper than
        re-embedding the whole knowledge base.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The `hash_id` of the knowledge base
      requestBody:
        description: Entry to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateChunkRequest'
        required: true
      responses:
        '200':
          description: Entry updated and re-embedded
          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:
    UpdateChunkRequest:
      required:
        - node_id
        - node_type
        - content
      type: object
      properties:
        node_id:
          description: The id of the entry to update
          type: string
        node_type:
          description: The type of the entry, e.g. `Question`
          type: string
        content:
          description: >-
            The new content (question text for FAQ entries, chunk text for
            documents)
          type: string
        answer:
          description: The new answer, for FAQ entries
          type: string
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header

````