Skip to main content

Delete Document

Delete one web or article knowledge entry.

Request​

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

Header Parameters​

ParameterTypeRequiredDescription
x-chat-signaturestringYesHMAC-SHA256 signature
AcceptstringNoDefault: application/json
Content-TypestringYesapplication/json

Body Parameters​

ParameterTypeRequiredDescription
appidstringYesApplication identifier from the console
timestampintegerYesRequest timestamp
ranstrstringYesRandom string
idintegerYesExisting web or article knowledge ID

Request Example​

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

Response​

200 Success​

ParameterTypeRequiredDescription
codeintegerYes1 success, -1 failure
msgstringYesResponse message
datastringYesResponse payload
{
"code": 1,
"msg": "ok",
"data": ""
}

Error Example​

{
"code": -1,
"msg": "Invalid parameters",
"data": ""
}