Skip to main content
DELETE
/
v3
/
documents
/
bulk
Bulk delete documents
const url = 'https://api.supermemory.ai/v3/documents/bulk';
const options = {
  method: 'DELETE',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"ids":["acxV5LHMEsG2hMSNb4umbn","bxcV5LHMEsG2hMSNb4umbn"]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
{
  "success": true,
  "deletedCount": 2,
  "errors": [
    {
      "id": "<string>",
      "error": "<string>"
    }
  ],
  "containerTags": [
    "user_123",
    "project_123"
  ]
}

Authorizations

Authorization
string
header
required

Body

application/json
ids
string[]
Required array length: 1 - 100 elements
Example:
containerTags
string[]
Minimum length: 1
Example:

Response

success
boolean
required
Example:
deletedCount
number
required
Example:
errors
object[]
containerTags
string[]
Example: