Skip to content

Update a knowledge base

PATCH
/v1/knowledge-bases/{kb_id}

Update the name, description, or metadata of a knowledge base.

kb_id
required
string
/^kb_/
Example
kb_a1b2c3d4e5

Knowledge base ID

object
name

Updated name

string
>= 1 characters <= 256 characters
Example
Updated Product Docs
description

Updated description

string
<= 1024 characters
Example
Updated description
metadata

Updated metadata (replaces existing metadata)

object
key
additional properties
any
Example
{
"team": "product"
}

Knowledge base updated

object
data
required
object
id
required

Knowledge base ID (prefixed with kb_)

string
Example
kb_a1b2c3d4e5
account_id
required

Owning account ID

string
Example
acc_x9y8z7w6v5
name
required

Knowledge base name

string
Example
Product Documentation
description

Optional description

string
nullable
Example
All product docs and guides
metadata
required

Arbitrary JSON metadata

object
key
additional properties
any
Example
{
"team": "engineering",
"version": 3
}
document_count
required

Number of documents in this knowledge base

integer
Example
42
created_at
required
string format: date-time
Example
2026-02-10T12:00:00.000Z
updated_at
required
string format: date-time
Example
2026-02-10T14:30:00.000Z

Request validation failed

object
error
required
object
code
required

Machine-readable error code

string
Allowed values: VALIDATION_ERROR AUTHENTICATION_ERROR NOT_FOUND CONFLICT RATE_LIMIT_EXCEEDED USAGE_LIMIT_EXCEEDED EXTERNAL_SERVICE_ERROR INTERNAL_ERROR
Example
VALIDATION_ERROR
message
required

Human-readable error message

string
Example
Invalid request body
details

Additional error details (e.g., validation issues)

object
key
additional properties
any
Example
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request body",
"details": {
"issues": [
{
"path": [
"name"
],
"message": "Required"
}
]
}
}
}

Authentication failed or missing

object
error
required
object
code
required

Machine-readable error code

string
Allowed values: VALIDATION_ERROR AUTHENTICATION_ERROR NOT_FOUND CONFLICT RATE_LIMIT_EXCEEDED USAGE_LIMIT_EXCEEDED EXTERNAL_SERVICE_ERROR INTERNAL_ERROR
Example
VALIDATION_ERROR
message
required

Human-readable error message

string
Example
Invalid request body
details

Additional error details (e.g., validation issues)

object
key
additional properties
any
Example
{
"error": {
"code": "AUTHENTICATION_ERROR",
"message": "Invalid or missing API key"
}
}

Resource not found

object
error
required
object
code
required

Machine-readable error code

string
Allowed values: VALIDATION_ERROR AUTHENTICATION_ERROR NOT_FOUND CONFLICT RATE_LIMIT_EXCEEDED USAGE_LIMIT_EXCEEDED EXTERNAL_SERVICE_ERROR INTERNAL_ERROR
Example
VALIDATION_ERROR
message
required

Human-readable error message

string
Example
Invalid request body
details

Additional error details (e.g., validation issues)

object
key
additional properties
any
Example
{
"error": {
"code": "NOT_FOUND",
"message": "KnowledgeBase not found: kb_nonexistent"
}
}

Rate limit exceeded

object
error
required
object
code
required

Machine-readable error code

string
Allowed values: VALIDATION_ERROR AUTHENTICATION_ERROR NOT_FOUND CONFLICT RATE_LIMIT_EXCEEDED USAGE_LIMIT_EXCEEDED EXTERNAL_SERVICE_ERROR INTERNAL_ERROR
Example
VALIDATION_ERROR
message
required

Human-readable error message

string
Example
Invalid request body
details

Additional error details (e.g., validation issues)

object
key
additional properties
any
Example
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded"
}
}