Delete All 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.
Deletion scope
For a scoped caller, this deletes only that caller's content rows; shared rows remain. Admins and unscoped callers clear the whole selected knowledge base. Success returns the JSON string "success". A vector-deletion failure returns 500.
/knowledge/contentPermanently remove all content from the knowledge base. This is a destructive operation that cannot be undone. Use with extreme caution.
Authorization
HTTPBearer In: header
Query Parameters
Database ID to use
Knowledge base ID to use
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl --request DELETE 'https://example.com/knowledge/content'null{ "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"}