Skip to main content
PATCH
/
agents
/
{agentId}
/
kb
/
{docId}
Update Knowledge Base
curl --request PATCH \
  --url https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/kb/{docId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "content": "<string>",
  "metadata": {
    "description": "<string>"
  },
  "tags": [
    "<string>"
  ],
  "refreshRate": "3d",
  "url": "<string>"
}
'
{
  "success": true,
  "message": "<string>",
  "data": {}
}

Example: Update Name and Tags

{
  "name": "Updated Product FAQ",
  "tags": ["faq", "product", "v2"]
}

Example: Update Content

{
  "content": "Updated document content...",
  "metadata": {
    "description": "Updated description for better context"
  }
}
Updating content triggers re-embedding which may take time for large documents.
Only include fields you want to update. Other fields remain unchanged.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agentId
string
required

The unique identifier of the agent

docId
string
required

The unique identifier of the KB document to update

Body

application/json
name
string

Document name/title

content
string

Document text content (triggers re-embedding)

metadata
object
tags
string[]

Array of tags for categorization

refreshRate
enum<string>

Auto-refresh interval for URL sources

Available options:
3d,
7d,
never
url
string

Source URL for URL-based documents

Response

Successful response

success
boolean
required

Indicates if the update was successful

message
string
required

Response message confirming update

data
object

Updated KB document data