Delete Content By Id

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.

Use the content ID from upload or listing in the selected knowledge base. Success returns a content response containing the deleted id; it does not return the removed record's full metadata. Other optional fields can be null. Vector-deletion failure can return 500.

DELETE/knowledge/content/{content_id}

Permanently remove a specific content item from the knowledge base. This action cannot be undone.

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

content_id*Content Id

Query Parameters

db_id?|

Database ID to use

knowledge_id?|

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/string'
{  "id": "string",  "name": "string",  "description": "string",  "type": "string",  "size": "string",  "linked_to": "string",  "metadata": {},  "access_count": 0,  "status": "processing",  "status_message": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}