# 关闭会话
请求方式:POST
请求地址:https://$basehost/gateway/eaopen/CloseChat
body参数:
{
"customer_service_account": "pzer",
"robot_id": "accuQiY9a1jbTwinD",
"contact_id": "acc5sJewVgUdp8bu",
"mark": "关闭会话"
}
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| customer_service_account | string | 否 | 客服登录账号 |
| customer_service_open_id | string | 否 | 客服id,customer_service_account、customer_service_open_id二选一必传一个 |
| robot_id | string | 否 | 机器人open id |
| contact_id | string | 否 | 机器人open id |
| mark | string | 否 | 关闭会话备注 ,最多允许100个字符 |
返回值:
{
"errcode": 0,
"errmsg": "",
"hint": "gg58r23fh6339rrs"
}
返回说明
| 字段 | 类型 | 说明 |
|---|---|---|
| errcode | int | 状态码,0为正常,非0代表错误 |
| errmsg | string | 错误信息 |
| hint | string | 请求日志ID |
完整请求示例:
curl --location --request POST 'http://$basehost/gateway//eaopen/CloseChat' \
--header 'Token: token' \
--header 'Content-Type: application/json' \
--data-raw '{
"customer_service_account": "pzer",
"robot_id": "accuQiY9a1jbTwinD",
"contact_id": "acc5sJewVgUdp8bu",
"mark": "关闭会话"
}'