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

# Update KB Doc

> <strong>(Convocore agents only)</strong> Updates knowledge base, if your agent is built with VF use [Voiceflow's API instead](https://developer.voiceflow.com/reference/project). This route must use the new V3 [endpoints](/api-reference/v3/intro).

## Example: Update Name and Tags

```json theme={null}
{
  "name": "Updated Product FAQ",
  "tags": ["faq", "product", "v2"]
}
```

## Example: Update Content

```json theme={null}
{
  "content": "Updated document content...",
  "metadata": {
    "description": "Updated description for better context"
  }
}
```

<Warning>
  Updating `content` triggers re-embedding which may take time for large documents.
</Warning>

<Tip>
  Only include fields you want to update. Other fields remain unchanged.
</Tip>


## OpenAPI

````yaml PATCH /agents/{agentId}/kb/{docId}
openapi: 3.0.3
info:
  title: Convocore OpenAPI
  description: Full API reference for Convocore
  version: 1.0.4
servers:
  - url: https://eu-gcp-api.vg-stuff.com/v3
    description: EU Node.js API server
  - url: https://na-gcp-api.vg-stuff.com/v3
    description: NA Node.js API server
security: []
paths:
  /agents/{agentId}/kb/{docId}:
    patch:
      tags:
        - KB
      summary: Update Knowledge Base
      operationId: kbRouter-updateKnowledgeBase
      parameters:
        - name: agentId
          in: path
          required: true
          schema:
            type: string
        - name: docId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                content:
                  type: string
                metadata:
                  type: object
                  properties:
                    description:
                      type: string
                  required:
                    - description
                  additionalProperties: false
                tags:
                  type: array
                  items:
                    type: string
                refreshRate:
                  type: string
                  enum:
                    - 3d
                    - 7d
                    - never
                url:
                  type: string
              additionalProperties: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  data: {}
                required:
                  - success
                  - message
                additionalProperties: false
        default:
          $ref: '#/components/responses/error'
      security:
        - Authorization: []
components:
  responses:
    error:
      description: Error response
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              code:
                type: string
              issues:
                type: array
                items:
                  type: object
                  properties:
                    message:
                      type: string
                  required:
                    - message
                  additionalProperties: false
            required:
              - message
              - code
            additionalProperties: false
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````