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

# 删除 Memory Store

> 永久删除一个 Memory Store 及其所有 memory 和 version。

`DELETE /api/v1/cloud/memory_stores/{memory_store_id}`

永久删除指定的 Memory Store，连同其下所有 memory 和 version 一并删除。

## 请求头

| 头部              | 必选 | 说明             |
| --------------- | -- | -------------- |
| `Authorization` | 是  | `Bearer <PAT>` |

## 路径参数

| 参数                | 类型     | 必选 | 说明                              |
| ----------------- | ------ | -- | ------------------------------- |
| `memory_store_id` | string | 是  | Memory Store ID，前缀为 `memstore_` |

## 示例请求

```bash theme={null}
curl -X DELETE "https://api.qoder.com/api/v1/cloud/memory_stores/memstore_019e3bb8d50674d9b082b73709c29c87" \
  -H "Authorization: Bearer $QODER_PAT"
```

## 示例响应

**HTTP 200 OK**

```json theme={null}
{
  "id": "memstore_019e3bb8d50674d9b082b73709c29c87",
  "type": "memory_store_deleted"
}
```

## 注意事项

不需要请求体。`active` 和 `archived` 状态的 Store 均可删除。删除为永久删除，不可恢复。

## 错误码

| HTTP | type                   | 触发条件                     |
| ---- | ---------------------- | ------------------------ |
| 401  | `authentication_error` | 缺少或无效的认证令牌               |
| 404  | `not_found_error`      | 指定 ID 的 Memory Store 不存在 |

完整错误信封说明详见 [错误参考](/zh/cloud-agents/api/conventions/errors)。
