> ## 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

> 删除一条 memory。

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

删除一条 memory。系统会记录一条 operation 为 `deleted` 的版本。

## 路径参数

| 参数                | 说明                              |
| ----------------- | ------------------------------- |
| `memory_store_id` | Memory Store ID（`memstore_...`） |
| `memory_id`       | Memory ID（`mem_...`）            |

## 请求头

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

## 示例请求

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

## 示例响应

```json theme={null}
{
  "id": "mem_...",
  "type": "memory_deleted"
}
```

## 错误码

| HTTP | type                    | 触发条件               |
| ---- | ----------------------- | ------------------ |
| 404  | `not_found_error`       | Store 或 memory 不存在 |
| 409  | `invalid_request_error` | Store 已归档          |

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