Edit Document
Update article knowledge content.
Request
POST https://apichat.twt.com/openapi/zhishi/edit_doc
Header Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
x-chat-signature | string | Yes | HMAC-SHA256 signature |
Accept | string | No | Default: application/json |
Content-Type | string | Yes | application/json |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
appid | string | Yes | Application identifier from the console |
timestamp | integer | Yes | Request timestamp |
ranstr | string | Yes | Random string |
id | integer | Yes | Existing article knowledge ID |
mc | string | Yes | Updated article title, 1 to 255 characters |
nr | string | Yes | Updated 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
| Parameter | Type | Required | Description |
|---|---|---|---|
code | integer | Yes | 1 success, -1 failure |
msg | string | Yes | Response message |
data | string | Yes | Response payload |
{
"code": 1,
"msg": "ok",
"data": ""
}
Error Example
{
"code": -1,
"msg": "Invalid parameters",
"data": ""
}