> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memorylake.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Batch Delete Items

> Delete up to 100 files or folders from the Library in one request (recursive for folders)

```
POST /openapi/memorylake/api/v1/drives/items/delete
```

Permanently deletes several files or folders in one request. Deleting a folder also deletes **everything inside it**, recursively. To delete a single item, use [Delete Item](/features/memorylake/api-reference/library/delete-item).

> [!WARNING]
>
> This is destructive and irreversible. If any item is a folder, every file and subfolder under it is removed. Confirm with the user before calling this endpoint.

> [!NOTE]
>
> Deleting a file that is referenced by one or more project documents does not automatically remove those documents. Call [Delete Documents](/features/memorylake/api-reference/v3-documents/delete-documents) first if you want the documents to disappear from a project.

> [!NOTE]
>
> **Permission required:** [`drive:item_delete`](/features/team-collaboration/permission-reference#delete-files) · `service`

### Body Parameters

**item\_ids** `string[]` *required*

IDs of the items to delete, 1 to 100 per request. Your workspace root (`MY_SPACE`) cannot be deleted: if the list includes it, the whole request is rejected with `403` and nothing is deleted.

```bash cURL theme={null}
curl -X POST 'https://app.memorylake.ai/openapi/memorylake/api/v1/drives/items/delete' \
  -H 'Authorization: Bearer sk_xxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "item_ids": [
      "sc-5c6bf0f82d624a20a6fa4696997bdd46:7d8cf1e93f634b31b5",
      "sc-5c6bf0f82d624a20a6fa4696997bdd46:a1b2c3d4e5f6a7b8c9"
    ]
  }'
```

### Response

**success** `boolean`

Indicates if the request was successful

**message** `string`

Human-readable status message

If an item can't be deleted, the request stops and returns an error. Check the remaining items with [Get Item](/features/memorylake/api-reference/library/get-item) before you retry.

```json Success (200) theme={null}
{
  "success": true,
  "message": "Items deleted successfully"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.