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

# 批量删除条目

> 一次请求从文件库中删除最多 100 个文件或文件夹（文件夹为递归删除）

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

一次请求永久删除多个文件或文件夹。删除文件夹时会递归删除**其中的全部内容**。如只需删除单个条目，请使用[删除条目](/features/memorylake/api-reference/library/delete-item)。

> [!WARNING]
>
> 此操作具有破坏性且不可逆。如果其中有文件夹，其下的所有文件和子文件夹都会被移除。调用此接口前请先向用户确认。

> [!NOTE]
>
> 删除被一个或多个项目文档引用的文件时，不会自动移除这些文档。如果您希望文档也从项目中消失，请先调用[删除文档](/features/memorylake/api-reference/v3-documents/delete-documents)。

> [!NOTE]
>
> **所需权限：** [`drive:item_delete`](/features/team-collaboration/permission-reference#删除文件) · `service`

### 请求体参数

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

要删除的条目 ID 列表，每次 1 到 100 个。工作空间根目录（`MY_SPACE`）无法删除：列表中包含它时，整个请求会以 `403` 被拒绝，任何条目都不会被删除。

```bash cURL theme={null}
curl -X POST 'https://app.memorylake.cn/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"
    ]
  }'
```

### 响应

**success** `boolean`

表示请求是否成功

**message** `string`

可读的状态消息

如果某个条目删除失败，请求会立即中止并返回错误。重试前请先用[获取条目](/features/memorylake/api-reference/library/get-item)确认剩余条目的状态。

```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.