更新消息
适用版本>=v7.0.2502a.20250213
接口说明:更新消息
请求说明
| 请求地址 | 配置域名+/openapi+/v7/messages/{message_id}/update |
|---|---|
| 请求方法 | POST |
| 签名方式 | KSO-1(配置域名+/openapi不参与签名) |
| 权限要求 | 查询和管理会话消息(应用授权) kso.chat_message.readwrite |
请求头(Header)
| Header | 参数类型 | 是否必填 | 说明 |
|---|---|---|---|
| X-Kso-Date | string | 是 | RFC1123 格式的日期,例: Wed, 23 Jan 2013 06:43:08 GMT |
| X-Kso-Authorization | string | 是 | KSO-1 签名值,详见《签名方法》 |
| Authorization | string | 是 | 授权凭证,格式为:Bearer {access_token} |
| X-Kso-Id-Type | string | 否 | ID 类型,可选值为 internal 或 external,不传默认为internal。当值为 external 时,开启三方 ID 模式,此时接口请求和响应中的 user_id 和 dept_id 应为三方ID,即 ex_user_id 和 ex_dept_id |
路径参数(Path)
| 名称 | 参数类型 | 说明 |
|---|---|---|
| message_id | string | 消息 id |
请求体(Body)
| 名称 | 参数类型 | 是否必填 | 说明 |
|---|---|---|---|
| type | string[enum] | 是 | 消息类型,仅支持 card:卡片消息 |
| content | object | 是 | 消息内容 |
| ∟ card | object | 否 | 仅卡片消息,详见:消息内容(content)结构说明 |
请求体示例
json
{
"type": "string[enum]",
"content": {
// 当消息类型为文本 type=card 时,传递 card 对象
"card": {}
}
}1
2
3
4
5
6
7
2
3
4
5
6
7
响应体
| 名称 | 参数类型 | 说明 |
|---|---|---|
| code | integer | 响应代码 |
| msg | string | 响应信息 |
响应体示例
json
{
"code": 0,
"msg": "string"
}1
2
3
4
2
3
4