请求方法
POST https://open.sobot.com/open/platform/api.json
请求参数(Request Body)
| 参数名 | 类型 | 必填 | 说明 | |
|---|---|---|---|---|
| action | 字符串 | 是 | 传值为"chat_user_admin_send" | |
| access_token | 字符串 | 是 | 调用接口凭据 | |
| data | 对象 | 是 | 详见下文 | |
请求data
| 参数名 | 类型 | 必填 | 说明 | |
|---|---|---|---|---|
| sysNum | 字符串 | 是 | 企业标识,由智齿分配 | |
| partnerId | 字符串 | 是 | 企业自己的用户id,可自行传值 | |
| content | 字符串 | 是 | 用户问题 | |
| msgType | 字符串 | 否 | 消息类型 (text,image,voice,默认为text纯文本,如果为image和voice的时候,content传递图片地址或者音频地址,其中音频支持mp3,wav两种格式) | |
返回数据
| 参数名 | 类型 | 说明 | |
|---|---|---|---|
| code | 字符串 | 执行结果码,1000代表成功 | |
| data | 对象 | 详见下文 | |
返回data
| 参数名 | 类型 | 说明 | |
|---|---|---|---|
| status | 整型 | 1.成功 2.用户没有跟客服建立连接 | |
请求示例:
curl https://open.sobot.com/open/platform/api.json 
-X POST 
-H 'content-type: application/json' 
-d '
{
    "action": "chat_user_admin_send",
    "access_token": "xx", //获取access_token
    "data": {
        "sysNum": "xx",
        "partnerId": "xx",
        "content": "xx"
    }
} '
返回示例:
{
    "data": {
        "status": 1
    },
    "code": "1000"
}