PUT管理接口
更新条款文档
部分更新:只修改请求中出现的字段。`custom` 关闭时 `content` 仍会保存为草稿, 重新打开即可继续编辑;`content` 传空字符串表示清除草稿。
URL
/api/v1/admin/terms/documents/{slug}鉴权方式
需要管理员 JWT(Authorization: Bearer <token>)
请求参数
Path 参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| slug | privacy-policy | sdk-compliance | 是 | 条款文档标识,取值见 TermsDocumentSlug |
Header 参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| Authorization | string | 是 | Bearer <管理员 JWT 或 API Key> |
请求体
{
"custom": true,
"content": "# 隐私政策\n\n...\n"
}响应示例
200 响应
{
"slug": "privacy-policy",
"title": "string",
"summary": "string",
"custom": false,
"content": "string",
"custom_content": "string",
"custom_updated_at": 0,
"builtin_content": "string",
"builtin_updated_at": 0,
"updated_at": 0,
"placeholders": [
{
"key": "operator_name",
"label": "string",
"hint": "string",
"example": "string",
"required": false
}
]
}PUT
