Skip to main content
PATCH
/
knowledge_bases
/
{knowledge_base_id}
Update mutable fields on a knowledge base
curl --request PATCH \
  --url https://api.example.com/knowledge_bases/{knowledge_base_id} \
  --header 'Content-Type: application/json' \
  --header 'x-user-id: <x-user-id>' \
  --data '
{
  "name": "<string>",
  "description": "<string>"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "embedding_model_config": {
    "type": "<string>",
    "credential_id": "<string>",
    "model": "<string>",
    "dimensions": 123,
    "parameters": {}
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Headers

x-user-id
string
required

Caller's user ID. Temporary header-based identity; will be replaced by JWT auth.

Path Parameters

knowledge_base_id
string
required

The knowledge base id.

Body

application/json

Request body for updating a knowledge base.

Only mutable fields can be set here. The embedding model configuration is pinned at creation time and cannot be changed — switching it would invalidate every previously inserted vector.

name
string | null

New display name; omit to leave unchanged.

description
string | null

New free-form description; omit to leave unchanged.

Response

Successful Response

A knowledge base record as exposed to API clients.

Mirrors :class:KnowledgeBaseRecord with the internal user_id / collection_name fields stripped — clients have no business introspecting either.

id
string
required

The knowledge base identifier.

name
string
required

Display name of the knowledge base.

description
string
required

Free-form description.

embedding_model_config
EmbeddingModelConfig · object
required

Embedding model configuration pinned at creation.

created_at
string<date-time>
required

Creation timestamp.

updated_at
string<date-time>
required

Last-update timestamp.