Skip to main content
PATCH
Update knowledge base document

Headers

x-api-key
string | null

Your API key for programmatic access. Send it in the x-api-key header; you can create and manage keys from the Developers page.

Path Parameters

documentation_id
string
required

The id of a document from the knowledge base. This is returned on document addition.

Example:

"21m00Tcm4TlvDq8ikWAM"

Body

application/json
name
string | null

A custom, human-readable name for the document.

Minimum string length: 1
content
string | null

Updated content for the document. Only supported for text documents, URL documents with auto-sync disabled, and file documents that are not synced from an external source.

enable_auto_sync
boolean | null

Whether the document or folder is refreshed automatically. Only applicable to URL documents, folders, and externally-synced files. Leave unset to keep the current value.

auto_remove
boolean | null

Whether to automatically remove the document once its source is no longer available. Only applicable when auto-sync is enabled. Leave unset to keep the current value.

minimum_frequency_days
integer | null

Minimum frequency (in days) at which the document is refreshed. The actual interval may be shorter, never longer. Only applicable when auto-sync is enabled. Leave unset to keep the current value.

Required range: 1 <= x <= 180
tighten_only
boolean
default:false

Folders only. When true, items already in the folder are only tightened to stay at least as strict as the folder, and keep any setting that is stricter than the folder's. When false, they are set to exactly the folder's auto-sync settings. Ignored for externally synced folders, whose contents always follow the folder's schedule.

Response

Successful Response

id
string
required
name
string
required
metadata
KnowledgeBaseDocumentMetadataResponseModel · object
required
supported_usages
enum<string>[]
required
Available options:
prompt,
auto
access_info
ResourceAccessInfo · object
required
Example:
type
string
required
Allowed value: "url"
url
string
required
extracted_inner_html
string
required
folder_parent_id
string | null

The ID of the parent folder, or null if the document is at the root level.

chunking_override
ChunkingOverride · object | null

Per-entity RAG chunking override. Null means inherit from ancestors or the embedding model default.

folder_path
KnowledgeBaseFolderPathSegmentResponseModel · object[]

The folder path segments leading to this entity, from root to parent folder.

content_format
enum<string>
default:html

Canonical representation of a knowledge base document's stored content.

HTML is the legacy default; documents created before this field existed are interpreted as HTML.

Available options:
html,
markdown
auto_sync_info
AutoSyncInfo · object | null