跳至主要内容

删除文档知识

删除一条网页或文章知识。

请求​

POST https://apichat.twt.com/openapi/zhishi/delete_doc

Header 参数​

参数名类型必填说明
x-chat-signaturestring是HMAC-SHA256 签名
Acceptstring否默认值:application/json
Content-Typestring是application/json
langstring否响应语言,控制接口提示文案。支持值见语言配置。可选,默认 zh-cn;未传或非法时回退 zh-cn。该请求头不参与 HMAC 计算。

Body 参数​

参数名类型必填说明
appidstring是应用标识
timestampinteger是请求时间戳
ranstrstring是随机字符串
idinteger是已有的网页或文章知识 ID

请求示例​

{
"appid": "your-appid",
"timestamp": 1735689600,
"ranstr": "random-string",
"id": 1002
}

返回响应​

200 成功​

参数名类型必填说明
codeinteger是1 正常,-1 失败
msgstring是响应信息
datastring是响应数据
{
"code": 1,
"msg": "ok",
"data": ""
}

错误示例​

{
"code": -1,
"msg": "参数错误",
"data": ""
}