> ## Documentation Index
> Fetch the complete documentation index at: https://docs.convocore.app/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
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:
                  $ref: '#/components/schemas/description_fc7827'
                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:
                $ref: '#/components/schemas/ApiSuccessWithData_d1f498'
        default:
          $ref: '#/components/responses/error'
      security:
        - Authorization: []
components:
  schemas:
    description_fc7827:
      type: object
      properties:
        description:
          type: string
      required:
        - description
      additionalProperties: false
    ApiSuccessWithData_d1f498:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          $ref: '#/components/schemas/object_6929d85c'
      required:
        - success
        - message
        - data
      additionalProperties: false
    object_6929d85c:
      type: object
      properties:
        ID:
          type: string
        name:
          type: string
        url:
          type: string
        content:
          type: string
        contentURL:
          type: string
        agentId:
          type: string
        userId:
          type: string
        workspaceId:
          type: string
        agencyId:
          type: string
        tags:
          type: array
          items:
            type: string
        sourceType:
          type: string
          enum:
            - doc
            - url
        status:
          type: string
          enum:
            - ERROR
            - SUCCESS
            - PENDING
            - INITIALIZED
        refreshRate:
          type: string
          enum:
            - 3d
            - 7d
            - never
        withRefresh:
          type: boolean
        nextRefreshAt:
          type: number
        useProxy:
          type: boolean
        aiPostProcess:
          type: boolean
        dimensions:
          type: number
        charCount:
          type: number
        chunksIds_JSON_STRING:
          type: string
        ts:
          type: number
        createdAt:
          type: number
        updatedAt:
          type: number
        metadata:
          $ref: '#/components/schemas/description_393efa'
        refreshMetadata:
          $ref: '#/components/schemas/lastRefreshTS_aec298'
      additionalProperties: true
    message_11569e:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      additionalProperties: false
    description_393efa:
      type: object
      properties:
        description:
          type: string
      additionalProperties: false
    lastRefreshTS_aec298:
      type: object
      properties:
        lastRefreshTS:
          type: number
      additionalProperties: false
  responses:
    error:
      description: Error response
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              code:
                type: string
              issues:
                type: array
                items:
                  $ref: '#/components/schemas/message_11569e'
            required:
              - message
              - code
            additionalProperties: false
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````