Update document metadata
PATCH /v1/knowledge-bases/{kb_id}/documents/{doc_id}
Update the metadata of a document. Does not trigger re-processing.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Example
kb_a1b2c3d4e5Knowledge base ID
Example
doc_f6g7h8i9j0Document ID
Request Body required
Section titled “Request Body required ”object
New metadata (replaces existing metadata)
object
Example
{ "department": "product", "reviewed": true}Responses
Section titled “ Responses ”Document metadata updated
object
object
Document ID (prefixed with doc_)
Example
doc_f6g7h8i9j0Parent knowledge base ID
Example
kb_a1b2c3d4e5Owning account ID
Example
acc_x9y8z7w6v5Original file name
Example
product-guide.pdfFile extension
Example
pdfFile size in bytes
Example
2048576Number of pages (for Tier 1 files, set after parsing)
Example
15Number of chunks generated from this document
Example
34Error message if status is failed
User-supplied metadata (filterable at search time)
object
Example
{ "department": "engineering", "version": 2}Internal storage path
Example
acc_x9y8z7w6v5/kb_a1b2c3d4e5/doc_f6g7h8i9j0/product-guide.pdfExample
2026-02-10T12:00:00.000ZExample
2026-02-10T12:01:30.000ZRequest validation failed
object
object
Machine-readable error code
Example
VALIDATION_ERRORHuman-readable error message
Example
Invalid request bodyAdditional error details (e.g., validation issues)
object
Example
{ "error": { "code": "VALIDATION_ERROR", "message": "Invalid request body", "details": { "issues": [ { "path": [ "name" ], "message": "Required" } ] } }}Authentication failed or missing
object
object
Machine-readable error code
Example
VALIDATION_ERRORHuman-readable error message
Example
Invalid request bodyAdditional error details (e.g., validation issues)
object
Example
{ "error": { "code": "AUTHENTICATION_ERROR", "message": "Invalid or missing API key" }}Resource not found
object
object
Machine-readable error code
Example
VALIDATION_ERRORHuman-readable error message
Example
Invalid request bodyAdditional error details (e.g., validation issues)
object
Example
{ "error": { "code": "NOT_FOUND", "message": "KnowledgeBase not found: kb_nonexistent" }}Rate limit exceeded
object
object
Machine-readable error code
Example
VALIDATION_ERRORHuman-readable error message
Example
Invalid request bodyAdditional error details (e.g., validation issues)
object
Example
{ "error": { "code": "RATE_LIMIT_EXCEEDED", "message": "Rate limit exceeded" }}