Update Content
Select a knowledge base
Register a Knowledge with contents_db on AgentOS, an Agent or a Team. Read the actual generated ID from GET /config under knowledge.knowledge_instances; use that knowledge_id in the request's selector. It is not an arbitrary Knowledge.id. A selector is required when multiple instances make the request ambiguous (400); no configured knowledge base returns 503. If both selectors are supplied, knowledge_id takes precedence over db_id.
Ingestion and search also require suitable readers, vector storage, an embedder where needed, and their dependencies and credentials. See Knowledge.
Content access
Scoped callers can read their own and shared content; other-owned records return 404. JWT user scoping requires user isolation, while non-admin service-account PAT users always self-scope. A scoped caller cannot modify, refresh or delete shared content (403). Authentication alone does not enable JWT user isolation.
Patch metadata
Send form fields for name, description and JSON-object metadata. Metadata keys merge into existing metadata; blank name/description values are treated as omitted.
A supplied reader_id must identify a registered custom reader, but the current handler does not persist that reader change or reprocess the content. Use ingestion with the intended reader/chunker to change processing configuration.
/knowledge/content/{content_id}Update content properties such as name, description, metadata, or processing configuration. Allows modification of existing content without re-uploading.
Authorization
HTTPBearer In: header
Path Parameters
Content ID
Query Parameters
Database ID to use
Knowledge base ID to use
Request Body
application/x-www-form-urlencoded
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl --request PATCH 'https://example.com/knowledge/content/string'{ "id": "3c2fc685-d451-4d47-b0c0-b9a544c672b7", "name": "example.pdf", "description": "", "type": "application/pdf", "size": "251261", "metadata": {}, "access_count": 1, "status": "completed", "status_message": "", "created_at": "2025-09-08T15:22:53Z", "updated_at": "2025-09-08T15:22:54Z"}{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}