Skip to content
Get started

Bulk delete documents

DELETE/v3/documents/bulk

Bulk delete documents by IDs or container tags

Body ParametersJSONExpand Collapse
DeprecatedcontainerTags: optional array of string

Array of container tags - all documents in these containers will be deleted

filepath: optional string

Delete documents matching this filepath. Exact match for full paths, prefix match if ending with /

ids: optional array of string

Array of document IDs to delete (max 100 at once)

ReturnsExpand Collapse
deletedCount: number

Number of documents successfully deleted

success: boolean

Whether the bulk deletion was successful

DeprecatedcontainerTags: optional array of string

Container tags that were processed (only applicable when deleting by container tags)

errors: optional array of object { id, error }

Array of errors for documents that couldn’t be deleted (only applicable when deleting by IDs)

id: string
error: string

Bulk delete documents

curl https://api.supermemory.ai/v3/documents/bulk \
    -X DELETE \
    -H "Authorization: Bearer $SUPERMEMORY_API_KEY"
{
  "deletedCount": 2,
  "success": true,
  "containerTags": [
    "string"
  ],
  "errors": [
    {
      "id": "id",
      "error": "error"
    }
  ]
}
Returns Examples
{
  "deletedCount": 2,
  "success": true,
  "containerTags": [
    "string"
  ],
  "errors": [
    {
      "id": "id",
      "error": "error"
    }
  ]
}