Skip to main content
DELETE
Specify the resource category with the type parameter:
  • type=knowledge (default) - delete knowledge sources.
  • type=memory - delete memories.
Pass one or more IDs in ids. Send database, collection, ids, and type as top-level fields in the request body.

Knowledge deletion

Use type: "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

Use type: "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 in results[]. A failure on one ID does not stop the rest. For type=memory, the response reports an aggregate user_memory_deleted reflecting all listed IDs.
  • Retrieval drops the source immediately: Even before background cleanup finishes, deleted IDs disappear from /query and /context/list responses.
  • Mixed deletes need two calls: To delete both knowledge and memory items, send two requests - one with type=knowledge, one with type=memory.
Related Resources

Authorizations

Authorization
string
header
required

API key sent as a Bearer token: "Bearer prefix.secret"

Body

application/json

Delete request

collection
string

Collection scope. Defaults to the default collection when omitted. Formerly sub_tenant_id; the sub_tenant_id alias is still accepted (deprecated).

Example:

"team_docs"

database
string

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.

Example:

"acme_corp"

ids
string[]

IDs of the sources or memories to delete.

Example:
sub_tenant_id
string
deprecated

deprecated: use collection

Example:

"sub_tenant_4567"

tenant_id
string
deprecated

deprecated: use database

Example:

"tenant_1234"

type
enum<string>

Bucket to delete from: knowledge (default) or memory.

Available options:
knowledge,
memory
Example:

"knowledge"

Response

OK

data
object
Example:
error
object

Error message, empty string on success.

Example:
meta
object
Example:
success
boolean

Whether the request succeeded.

Example:

true