Skip to main content
PATCH
/
v1
/
knowledge
/
{kb_id}
Update Knowledge Base
curl --request PATCH \
  --url https://api.xpander.ai/v1/knowledge/{kb_id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "name": "<string>",
  "description": "<string>"
}'
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "type": "managed",
  "organization_id": "<string>",
  "agent_id": "<string>",
  "total_documents": 0
}
Modify a knowledge base’s configuration. Only provided fields will be updated.

Example Request

curl -X PATCH -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Updated Test KB","description":"Updated description"}' \
  https://api.xpander.ai/v1/knowledge/232faada-83c0-41e1-b6c8-83321c0d3c21

Example Response

{
  "id": "232faada-83c0-41e1-b6c8-83321c0d3c21",
  "name": "Updated Test KB",
  "description": "Updated description",
  "type": "managed",
  "organization_id": "91fbe9bc-35b3-41e8-b59d-922fb5a0f031",
  "agent_id": null,
  "total_documents": 0
}

Path Parameters

kb_id
string
required
Unique identifier of the knowledge base to update (UUID format)

Request Body

name
string
Display name for the knowledge base
description
string
Optional description of the knowledge base purpose
agent_id
string
UUID of the agent to attach this knowledge base to

Response

Returns the updated knowledge base object with all current configuration matching the structure from [Get Knowledge Base](/API reference/v1/knowledge/get-knowledge-base).

Authorizations

x-api-key
string
header
required

Path Parameters

kb_id
string
required

Body

application/json
name
string
required
description
string | null

Response

id
string
required
name
string
required
type
enum<string>
required
Available options:
managed,
external
organization_id
string
required
description
string | null
agent_id
string | null
total_documents
integer
default:0