Skip to main content

Edit Document

Update article knowledge content.

Request

POST https://apichat.twt.com/openapi/zhishi/edit_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 article knowledge ID
mcstringYesUpdated article title, 1 to 255 characters
nrstringYesUpdated article content, 1 to 2000 characters

Request Example

{
"appid": "your-appid",
"timestamp": 1735689600,
"ranstr": "random-string",
"id": 1002,
"mc": "Getting Started",
"nr": "Updated article content."
}

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": ""
}