Skip to main content
PATCH
/
ai-agents
/
agent-builder
/
agents
/
{uid}
/
knowledge-base
/
{sourceType}
/
add
Add Files to Agent Knowledge Base
curl --request PATCH \
  --url https://{appid}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/agents/{uid}/knowledge-base/{sourceType}/add \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "uniqueIds": [
    "60f7b3b3b3b3b3b3b3b3b3b3",
    "60f7b3b3b3b3b3b3b3b3b3b4"
  ]
}
'
{
  "success": true
}

Authorizations

apikey
string
header
required

API Key (i.e. Rest API Key from the Dashboard).

Path Parameters

uid
string
required

Unique identifier of the agent

sourceType
string
required

Source type (uploads, knowledge-base, etc.)

Body

application/json
uniqueIds
string[]
required

Array of file IDs to be added to the knowledge base

Example:
[
"60f7b3b3b3b3b3b3b3b3b3b3",
"60f7b3b3b3b3b3b3b3b3b3b4"
]

Response

200 - application/json

Files added to knowledge base successfully

The response is of type object.