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

# Redact Memory 版本

> 永久移除某个 memory 版本的内容。

`POST /api/v1/cloud/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redact`

永久移除某个版本已存储的内容。版本元数据保留，用于审计。

## 路径参数

| 参数                  | 说明                              |
| ------------------- | ------------------------------- |
| `memory_store_id`   | Memory Store ID（`memstore_...`） |
| `memory_version_id` | 版本 ID（`memver_...`）             |

## 请求头

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

## 示例请求

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

## 响应

返回已 redact 的 [Memory Version 对象](/zh/cloud-agents/api/memory-stores/schemas#memory-version-对象)。

## 错误码

| HTTP | type                    | 触发条件                |
| ---- | ----------------------- | ------------------- |
| 404  | `not_found_error`       | Store 或 version 不存在 |
| 409  | `invalid_request_error` | 已经 redact 过         |

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