Delete Context
Delete knowledge or memories by their IDs.
type parameter:
type=knowledge(default) - delete knowledge sources.type=memory- delete memories.
ids. Send database, collection, ids, and type as top-level fields in the request body.
Knowledge deletion
Usetype: "knowledge" and pass knowledge ids in the ids array. Include the same collection you used when ingesting the knowledge; omitting it targets the default collection.
Memory deletion
Usetype: "memory" and pass memory ids in the ids array. Include the same collection you used when ingesting the memories; omitting it targets the default collection.
Some additional notes
- Partial-success semantics: For
type=knowledge, each ID is reported independently inresults[]. A failure on one ID does not stop the rest. Fortype=memory, the response reports an aggregateuser_memory_deletedreflecting all listed IDs. - Retrieval drops the source immediately: Even before background cleanup finishes, deleted IDs disappear from
/queryand/context/listresponses. - Mixed deletes need two calls: To delete both knowledge and memory items, send two requests - one with
type=knowledge, one withtype=memory.
Authorizations
API key sent as a Bearer token: "Bearer prefix.secret"
Body
Delete request
Collection scope. Defaults to the default collection when omitted. Formerly sub_tenant_id; the sub_tenant_id alias is still accepted (deprecated).
"team_docs"
Database/Collection are the canonical v2 names; TenantID/SubTenantID are their deprecated aliases, reconciled by the TenantAliases middleware before binding so TenantID is always populated.
"acme_corp"
IDs of the sources or memories to delete.
deprecated: use collection
"sub_tenant_4567"
deprecated: use database
"tenant_1234"
Bucket to delete from: knowledge (default) or memory.
knowledge, memory "knowledge"