feat: add htsy skill with CLI usage and API references
This commit is contained in:
@@ -0,0 +1,140 @@
|
||||
# 账号、用户、席位与角色
|
||||
|
||||
## 目录
|
||||
|
||||
- [登录与注册命令](#登录与注册命令)
|
||||
- [账号管理](#账号管理)
|
||||
- [用户管理](#用户管理)
|
||||
- [席位管理](#席位管理)
|
||||
- [角色管理](#角色管理)
|
||||
- [订单与余额](#订单与余额)
|
||||
- [通知与操作记录](#通知与操作记录)
|
||||
- [常用示例](#常用示例)
|
||||
|
||||
## 登录与注册命令
|
||||
|
||||
优先使用 CLI 封装命令:
|
||||
|
||||
```bash
|
||||
htsy-cli login --username USER --password PASS
|
||||
htsy-cli account-login --phone PHONE --code CODE
|
||||
htsy-cli send-code --phone PHONE --scene register
|
||||
htsy-cli register --username PHONE --password PASS --sms-code CODE
|
||||
```
|
||||
|
||||
验证码 `scene` 常用值:`register` 注册、`resetPwd` 重置密码、`login` 登录、`bind` 绑定手机号。
|
||||
|
||||
## 账号管理
|
||||
|
||||
| 目标 | 接口 | 请求字段 | 常用返回字段 |
|
||||
| --- | --- | --- | --- |
|
||||
| 账号信息 | `POST /api/account/info` | `{}` | `id`(int64);`phone`(string);`main`(bool,是否是主账号);`cfg`(CfgItem,账号配置);`clientType`(string,客户端类型);`clientDownloadUrl`(string,客户端下载地址);`isDistributor`(bool,是否是渠道商);`agreeTerms`(bool,是否同意条款 false) |
|
||||
| 登录 | `POST /api/account/login/in` | `phone`(string, 必填);`password`(string, 可选,密码登录);`code`(string, 可选,验证码登录) | `token`(string) |
|
||||
| 设置账号配置 | `POST /api/account/cfg/set` | `singleDel`(bool, 必填,false 手动 true 自动);`singleCronNum`(int64, 必填,定时单删的好友上限 默认全部删除);`singleDelEvent`(bool, 必填,false 不执行, true执行);`singleBlacklistDel`(bool, 必填,被客户加入黑名单 是否定时删除 false 手动, true 自动);`singleBlacklistNum`(int64, 必填,定时删除被客户加入黑名单的客户上线 默认全部删除);`singleBlacklistEvent`(bool, 必填,被客户加入黑名单时删除客户 false 不执行, true执行);`botIds`(repeated int64, 可选,生效的微号id);`botRangeType`(string, 可选,all 所有 specify 指定);`isSendMsg`(bool, 可选,删除前是否发送消息);`messageList`(repeated Message, 可选,消息列表);`schedule`(Schedule, 可选,删除时间);`frequency`(Frequency, 可选,频率设置);`isSendFriendApply`(bool, 可选,删除前是否发送好友申请);`verifyContent`(string, 可选,好友申请的文本);`qwQueueCfg`(QueueCfg, 可选,企微队列配置);`wxQueueCfg`(QueueCfg, 可选,企微队列配置);`localBotSyncTagCfg`(LocalBotSyncTagCfg, 可选,本地微号同步标签配置) | 空对象或无业务数据 |
|
||||
| 检查这个手机号是否属于海豚账号 | `POST /api/account/check/phone` | `phone`(string, 可选);`num`(int64, 可选);`botType`(int32, 可选);`codeType`(int32, 可选) | `flag`(bool);`accountId`(int64);`darkToken`(string);`price`(float) |
|
||||
| 账号级白名单配置详情 | `POST /api/account/whiteList/info` | `{}` | `groupIds`(repeated int64,个微白名单群) |
|
||||
| 账号级白名单配置更新 | `POST /api/account/whiteList/update` | `groupIds`(repeated int64, 必填,个微白名单群) | 空对象或无业务数据 |
|
||||
| 资源包列表 | `POST /api/account/resource/list` | `{}` | `list`(repeated ResourcePackageInfoReply,资源包类型) |
|
||||
| 分享注册链接 | `POST /api/account/shareRegisterLink` | `{}` | `link`(string) |
|
||||
| 同意条款 | `POST /api/account/agreeTerms` | `agree`(bool, 可选) | 空对象或无业务数据 |
|
||||
| 资源包充值 | `POST /api/account/resource/order/create` | `num`(int64, 必填,数量);`pkgId`(int64, 必填,资源包id);`payType`(int32, 必填,支付类型 1 余额 2 微信支付) | `qrCode`(string,微信支付的时候存在 二维码);`orderId`(string,订单id);`price`(double,实付价);`originPrice`(double,原价);`payType`(int32,支付类型 1 余额 2 微信支付);`totalAmount`(double,到账总价);`tables`(google.protobuf.Value,表格名字) |
|
||||
| 资源包定价 | `POST /api/account/resource/prices` | `{}` | `riskList`(repeated ResourcePackagePrices,风控指数资源包);`contentSecurity`(repeated ResourcePackagePrices,内容安全资源包) |
|
||||
| 资源包对公购买 | `POST /api/account/resource/buy` | `num`(int64, 必填,数量);`pkgId`(int64, 必填,资源包id);`accountId`(int64, 必填,accountId);`auth`(string, 必填) | 空对象或无业务数据 |
|
||||
|
||||
|
||||
## 用户管理
|
||||
|
||||
| 目标 | 接口 | 请求字段 | 常用返回字段 |
|
||||
| --- | --- | --- | --- |
|
||||
| 用户信息 | `POST /api/account/user/info` | `{}` | `accountInfo`(AccountInfo,账号信息);`nickname`(string,昵称);`avatar`(string,头像);`wxBotNum`(int64,个微机器人数量);`username`(string,用户名);`mainAccount`(bool,是否是主账号);`bindGzh`(bool,是否绑定公众号);`id`(int64,子账号id);`qwBotNum`(int64,企微机器人数量);`isSetPassword`(bool,是否设置了密码);... |
|
||||
| 创建子账号 | `POST /api/account/user/create` | `username`(string, 必填,用户名);`password`(string, 必填,密码);`nickname`(string, 可选,昵称);`avatar`(string, 可选,头像);`roleId`(int64, 可选,角色id) | 空对象或无业务数据 |
|
||||
| 删除子账号 | `POST /api/account/user/delete` | `id`(int64, 必填,子账号id) | 空对象或无业务数据 |
|
||||
| 用户账号登录 | `POST /api/account/user/login/in` | `username`(string, 必填,子账号用户名 xxx@主账号手机号);`password`(string, 必填,密码) | `token`(string,token) |
|
||||
| 用户账号登出 | `POST /api/account/user/login/logout` | `{}` | 空对象或无业务数据 |
|
||||
| 子账号列表 | `POST /api/account/user/list` | `page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`roleId`(int64, 可选,角色的ID) | `list`(repeated HttpUserInfo,组内群列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 修改密码 | `POST /api/account/user/password/modify` | `oldPassword`(string, 可选,旧密码);`newPassword`(string, 可选);`code`(string, 可选,验证码修改);`phone`(string, 可选,获取验证码的手机号) | 空对象或无业务数据 |
|
||||
| 获取登录二维码 | `POST /api/account/user/login/qrCode` | `{}` | `link`(string,二维码链接);`code`(string,回调code) |
|
||||
| 扫码回调 | `POST /api/account/user/login/scan/callback` | `code`(string, 必填,回调code) | `success`(bool,是否成功);`list`(repeated AccountUser,多账号列表) |
|
||||
| 选择需要登录的账号登录 | `POST /api/account/user/login/scan/loginIn` | `code`(string, 必填,回调code);`id`(int64, 必填,userid) | `token`(string,token) |
|
||||
| 查看账号列表 | `POST /api/account/user/accountUserList` | `{}` | `list`(repeated AccountUser,多账号列表) |
|
||||
| 切换登录账号 | `POST /api/account/user/switchLogin` | `id`(int64, 必填,子账号id) | `token`(string,token) |
|
||||
| 绑定公众号 | `POST /api/account/user/bind/gzh` | `{}` | `link`(string,二维码链接);`code`(string,回调code) |
|
||||
| 解绑公众号 | `POST /api/account/user/unBind/gzh` | `{}` | 空对象或无业务数据 |
|
||||
| 修改昵称 | `POST /api/account/user/modify/nickname` | `nickname`(string, 必填,昵称);`userId`(int64, 可选,子账号id) | 空对象或无业务数据 |
|
||||
| 修改头像 | `POST /api/account/user/modify/avatar` | `avatar`(string, 必填,头像);`userId`(int64, 可选,子账号id) | 空对象或无业务数据 |
|
||||
| 修改子账号密码 | `POST /api/account/user/modify/userPassword` | `userId`(int64, 必填,子账号id);`password`(string, 必填,密码) | 空对象或无业务数据 |
|
||||
| 用户注册 | `POST /api/account/user/register` | `username`(string, 必填,用户名,也是手机号码);`password`(string, 必填,密码);`smsCode`(string, 必填,短信验证码);`inviteToken`(string, 可选,注册码) | `token`(string,token) |
|
||||
| 发送短信验证码 | `POST /api/account/user/phone/sendCode` | `phone`(string, 必填,手机号码);`scene`(string, 必填,场景 注册 register 修改密码 resetPwd 登录 login 绑定手机号 bind) | 空对象或无业务数据 |
|
||||
| 设置密码 | `POST /api/account/user/setPassword` | `password`(string, 必填,设置密码) | 空对象或无业务数据 |
|
||||
| 关联手机号码 | `POST /api/account/bindPhone` | `phone`(string, 必填,手机号码);`smsCode`(string, 必填,短信验证码) | 空对象或无业务数据 |
|
||||
| 获取客服子账号 | `POST /api/account/customer/list` | `{}` | `list`(repeated HttpUserInfo,组内群列表) |
|
||||
|
||||
|
||||
## 席位管理
|
||||
|
||||
| 目标 | 接口 | 请求字段 | 常用返回字段 |
|
||||
| --- | --- | --- | --- |
|
||||
| 席位管理-列表 | `POST /api/account/bot/list` | `page`(int64, 可选,分页page);`pageSize`(int64, 可选,分页page size);`statusList`(repeated int32, 可选,席位状态);`botStatusList`(repeated int64, 可选,机器人状态);`name`(string, 可选,名字 与授权码 互斥);`botKey`(string, 可选,授权码);`botType`(int32, 可选,席位类型 1个微 2企微);`botId`(int64, 可选,机器人id);`codeType`(int32, 可选,授权码类型 1 客户端 2 协议);`userId`(int64, 可选,成员id);`sort`(int32, 必填,0 默认排序 1 过期时间升序 2 过期时间降序);`botFunctionType`(int32, 可选,1 全功能 2 发单版);`tags`(repeated int64, 可选,按标签筛选);`clientVersion`(string, 可选,客户端版本 4.1.12 和 4.1.16);`clientPlatform`(int32, 可选,客户端平台类型 1 mac 2 pc 3 ipad) | `list`(repeated BotInfo,列表);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 席位管理-临期列表(30天) | `POST /api/account/bot/expiryList` | `page`(int64, 可选,分页page);`pageSize`(int64, 可选,分页page size);`botType`(int32, 可选,席位类型 1个微 2企微);`codeType`(int32, 可选,授权码类型 1 客户端 2 协议);`sort`(int32, 必填,0 默认排序 1 过期时间升序 2 过期时间降序) | `list`(repeated BotInfo,列表);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 席位管理-解绑 | `POST /api/account/bot/unbind` | `id`(int64, 可选) | 空对象或无业务数据 |
|
||||
| 席位管理-获取席位的登录配置 | `POST /api/account/bot/loginConf/byBotKey` | `botKey`(string, 必填,席位码);`type`(int32, 必填,获取配置的类型, 0 登录 1 升级) | `botKey`(string,席位码);`botType`(int32,微号类型);`codeType`(int32,席位类型);`clientVersion`(string,客户端版本 4.1.12 和 4.1.16);`clientPlatform`(int32,客户端平台类型 1 mac 2 pc 3 ipad);`nickname`(string,微号昵称);`avatar`(string,微号头像);`loginConf`(repeated BotCodeLoginConf,登录配置);`lasLoginType`(int64,上次登录方式 0 直接扫码 2 酷班app 3 其他登录方式) |
|
||||
| 批量设置成员微号范围 | `POST /api/account/bot/setBotPermission` | `userId`(int64, 必填,子账号的id);`wxBotList`(repeated int64, 可选,个微机器人列表 botid);`qwBotList`(repeated int64, 可选,企微机器人列表 botid) | 空对象或无业务数据 |
|
||||
| 批量设置成员席位范围 | `POST /api/account/bot/setBotKey` | `userId`(int64, 必填,子账号的id);`keyIdList`(repeated int64, 可选,席位ids) | 空对象或无业务数据 |
|
||||
| 席位管理-购买 | `POST /api/account/bot/buyBot/create` | `num`(int64, 必填,数量);`botType`(int32, 必填,1 个微 2企微);`codeType`(int32, 必填,1 本地 2 协议版);`payType`(int32, 必填,支付类型 1 余额 2 微信支付);`botFunctionType`(int32, 必填,1 全功能 2 发单 3 群发 4 接粉);`payMode`(string, 必填,年付 year 月付 month);`expireNum`(int64, 必填,1 一年/一个月 2.....) | `qrCode`(string,微信支付的时候存在 二维码);`orderId`(string,订单id);`price`(double,实付价);`originPrice`(double,原价);`payType`(int32,支付类型 1 余额 2 微信支付);`totalAmount`(double,到账总价);`tables`(google.protobuf.Value,表格名字) |
|
||||
| 席位管理-续费 | `POST /api/account/bot/renew/create` | `ids`(repeated int64, 必填,席位的ids);`payType`(int32, 必填,支付类型 1 余额 2 微信支付);`payMode`(string, 必填,年付 year 月付 month);`expireNum`(int64, 必填,1 一年/一个月 2.....) | `qrCode`(string,微信支付的时候存在 二维码);`orderId`(string,订单id);`price`(double,实付价);`originPrice`(double,原价);`payType`(int32,支付类型 1 余额 2 微信支付);`totalAmount`(double,到账总价);`tables`(google.protobuf.Value,表格名字) |
|
||||
| 席位管理-删除 | `POST /api/account/bot/del` | `ids`(repeated int64, 必填,席位的ids) | 空对象或无业务数据 |
|
||||
| 席位管理-席位功能类型变更 | `POST /api/account/bot/botFunctionType/change` | `botKeyIds`(repeated int64, 必填,需要降级的席位码Id);`payType`(int32, 必填,支付类型 1 余额 2 微信支付);`botFuncType`(int32, 必填,类型:1 全功能 2 发单) | `qrCode`(string,微信支付的时候存在 二维码);`orderId`(string,订单id);`price`(double,实付价);`originPrice`(double,原价);`payType`(int32,支付类型 1 余额 2 微信支付);`totalAmount`(double,到账总价);`tables`(google.protobuf.Value,表格名字) |
|
||||
| 登录h5链接获取 | `POST /api/account/bot/h5Link/get` | `botKeyId`(int64, 必填,席位码id) | `link`(string,分享给号主登录的h5链接) |
|
||||
| 登录h5链接获取登录信息 | `POST /api/account/bot/h5Link/info` | `botKey`(string, 必填,席位码);`botType`(int32, 必填,微号类型);`token`(string, 必填,授权token) | `nickname`(string,昵称);`avatar`(string,头像);`botType`(int32,微号类型);`clientVersion`(string,客户端版本 4.1.12 和 4.1.16);`clientPlatform`(int32,客户端平台类型 1 mac 2 pc 3 ipad) |
|
||||
| 席位标签-创建标签 | `POST /api/account/bot/tag/create` | `tagName`(string, 可选) | `id`(int64) |
|
||||
| 席位标签-创建信息更新 | `POST /api/account/bot/tag/update` | `id`(int64, 可选);`tagName`(string, 可选);`num`(int64, 可选,席位数量) | 空对象或无业务数据 |
|
||||
| 席位标签-删除标签 | `POST /api/account/bot/tag/del` | `id`(int64, 可选) | 空对象或无业务数据 |
|
||||
| 席位标签-标签列表 | `POST /api/account/bot/tag/list` | `page`(int64, 可选,分页page);`pageSize`(int64, 可选,分页page size) | `list`(repeated AccountBotTagItem,列表);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 席位标签-给席位添加标签或者删除标签 | `POST /api/account/bot/tag/addTagOrDelTag` | `accountBotTagId`(int64, 可选);`accountBotId`(int64, 可选);`isDel`(bool, 可选) | 空对象或无业务数据 |
|
||||
|
||||
|
||||
## 角色管理
|
||||
|
||||
| 目标 | 接口 | 请求字段 | 常用返回字段 |
|
||||
| --- | --- | --- | --- |
|
||||
| 角色列表 | `POST /api/account/role/list` | `{}` | `list`(repeated RoleItem,角色列表) |
|
||||
| 成员设置角色 | `POST /api/account/role/user/set` | `userIds`(repeated int64, 必填,成员的id);`roleId`(int64, 必填,角色id) | 空对象或无业务数据 |
|
||||
| 创建自定义角色 | `POST /api/account/role/add` | `name`(string, 必填,角色名字);`permissionList`(repeated int64, 必填,权限列表);`specialPermissionList`(repeated SpecialPermissionData, 必填,高级权限列表) | 空对象或无业务数据 |
|
||||
| 修改自定义角色 | `POST /api/account/role/update` | `id`(int64, 必填,角色id);`name`(string, 必填,角色名字);`permissionList`(repeated int64, 必填,权限列表);`specialPermissionList`(repeated SpecialPermissionData, 必填,高级权限列表) | 空对象或无业务数据 |
|
||||
| 删除自定义角色 | `POST /api/account/role/del` | `id`(int64, 必填,角色id) | 空对象或无业务数据 |
|
||||
| 全部权限列表 | `POST /api/account/role/all_permission` | `{}` | `list`(repeated PermissionItem,权限列表);`specialList`(repeated SpecialPermissionItem,特殊权限列表) |
|
||||
| 角色的权限列表 | `POST /api/account/role/permission/list` | `roleId`(int64, 必填,角色id) | `list`(repeated PermissionItem,权限列表);`specialList`(repeated SpecialPermissionItem,特殊权限列表) |
|
||||
| 角色包含的成员 | `POST /api/account/role/user/list` | `roleId`(int64, 必填,角色id) | `list`(repeated RoleUserItem,角色成员) |
|
||||
|
||||
|
||||
## 订单与余额
|
||||
|
||||
| 目标 | 接口 | 请求字段 | 常用返回字段 |
|
||||
| --- | --- | --- | --- |
|
||||
| 手机端订单详情 | `POST /api/account/order/detail` | `orderId`(string, 必填,订单id) | `name`(string,名字);`price`(double,实付价);`originPrice`(double,原价);`orderId`(string,订单号);`status`(string,待支付 wait 支付成功 success 支付失败 fail) |
|
||||
| 用余额完成订单 | `POST /api/account/order/complete/byBalance` | `orderId`(string, 必填,订单id) | 空对象或无业务数据 |
|
||||
| 用订单创建微信支付订单 | `POST /api/account/order/complete/byWxPay` | `orderId`(string, 必填,订单id);`openid`(string, 必填,openid) | `payInfo`(google.protobuf.Value,微信支付信息) |
|
||||
| 账号金额明细 | `POST /api/account/order/record/list` | `page`(int64, 可选);`pageSize`(int64, 可选);`payType`(string, 可选,支付类型:余额:balance 微信:wx);`incomeOrExpense`(int64, 可选,0:全部 1 收入 2 支出) | `list`(repeated RecordItem);`total`(int64);`last`(bool);`page`(int64);`pageSize`(int64) |
|
||||
| 各个产品的价格 | `POST /api/account/product/prices` | `{}` | `list`(repeated Product,全功能 1 个微协议 2 个微客户端 3 企微协议 4 企微客户端 发单 5 企微协议 6企微客户端) |
|
||||
| 充值余额 | `POST /api/account/recharge/balance` | `accountId`(int64, 可选);`auth`(string, 可选);`money`(double, 可选) | 空对象或无业务数据 |
|
||||
| 代理商-转账 | `POST /api/account/transfer/balance` | `phone`(string, 可选);`money`(double, 可选) | 空对象或无业务数据 |
|
||||
| 使用微信支付充值余额 | `POST /api/account/recharge/wxPay` | `money`(double, 可选) | `qrCode`(string,微信支付的时候存在 二维码);`orderId`(string,订单id);`price`(double,实付价);`originPrice`(double,原价);`payType`(int32,支付类型 1 余额 2 微信支付);`totalAmount`(double,到账总价);`tables`(google.protobuf.Value,表格名字) |
|
||||
|
||||
|
||||
## 通知与操作记录
|
||||
|
||||
| 目标 | 接口 | 请求字段 | 常用返回字段 |
|
||||
| --- | --- | --- | --- |
|
||||
| 用户操作记录 | `POST /api/account/operationRecord/list` | `page`(int64, 可选,分页page);`pageSize`(int64, 可选,分页pagesize);`userIds`(repeated int64, 可选,操作人);`startTime`(int64, 可选,操作人);`endTime`(int64, 可选,操作人);`ip`(string, 可选,ip搜索);`module`(string, 可选,操作模块);`action`(string, 可选,操作动作) | `list`(repeated RecordItem,日志列表);`page`(int64,分页page);`pageSize`(int64,分页pagesize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 模块列表 | `POST /api/account/operationRecord/modules` | `{}` | `list`(repeated ModuleItem,模块列表) |
|
||||
| 操作动作列表 | `POST /api/account/operationRecord/actions` | `module`(string, 必填,模块) | `list`(repeated ActionItem,动作列表) |
|
||||
|
||||
|
||||
## 常用示例
|
||||
|
||||
```bash
|
||||
htsy-cli call /api/account/info -d '{}'
|
||||
htsy-cli call /api/account/user/list -d '{"page":1,"pageSize":20}'
|
||||
htsy-cli call /api/account/bot/list -d '{"page":1,"pageSize":20,"botType":1}'
|
||||
htsy-cli call /api/account/role/list -d '{}'
|
||||
```
|
||||
@@ -0,0 +1,78 @@
|
||||
# 微号管理与消息发送
|
||||
|
||||
阅读本文件处理微号列表、微号分组、登录二维码、状态查询、发送消息、撤回、退出登录、二维码、迁移等操作。消息体结构见 [api-common.md](api-common.md)。
|
||||
|
||||
## 微号接口
|
||||
|
||||
| 目标 | 接口 | 请求字段 | 常用返回字段 |
|
||||
| --- | --- | --- | --- |
|
||||
| 微号机器人列表 | `POST /api/bot/wx/list` | `page`(int64, 可选,page);`pageSize`(int64, 可选,pageSize);`ids`(repeated int64, 可选,机器人ids);`name`(string, 可选,机器人名称);`statusList`(repeated int64, 可选,状态筛选);`groupId`(int64, 可选,分组id,-1未分组 0所有机器人 大于0 根据分组选择机器人);`botType`(int32, 必填,类型 1 个微 2企微);`corpId`(string, 可选,主体id);`threePartyService`(string, 可选,三方服务过滤部分字段使用);`moduleName`(string, 可选);`codeType`(int32, 可选,客户端类型 1本地 2云端);`loginPlatform`(int32, 可选,登录平台 1 mac 2 Windows 3 ipad);`onlyAbnormal`(bool, 可选,筛选出异常微号);`botFunctionType`(int32, 必填,1 全功能 2 发单 3 群发 4 接粉) | `list`(repeated HttpBotInfo);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 消息发送 | `POST /api/bot/wx/msg/send` | `botId`(int64, 必填,机器人id);`targetId`(int64, 必填,群id获取联系人id);`targetType`(string, 必填,发送对象 friend group);`botType`(int32, 必填,类型 1 个微 2企微);`msgType`(string, 必填,消息类型);`text`(MessageText, 可选,文本消息);`image`(MessageImage, 可选,图片消息);`sticker`(MessageSticker, 可选,表情消息);`video`(MessageVideo, 可选,视频消息);`audio`(MessageAudio, 可选,音频);`compositeImage`(MessageCompositeImage, 可选,合成图消息);`miniProgram`(MessageMiniProgram, 可选,小程序消息);`link`(MessageLink, 可选,链接消息);`inviteGroup`(MessageInviteGroup, 可选,入群邀请 inviteGroup);`freeVideo`(MessageFreeVideo, 可选,视频号 freeVideo);`materialId`(int64, 可选,素材id) | `recordId`(int64);`status`(string) |
|
||||
| 单条消息记录信息 | `POST /api/bot/wx/msg/record/get` | `id`(int64, 可选);`botType`(int32, 必填,类型 1 个微 2企微) | `id`(int64);`status`(string,消息状态);`failReason`(string,失败原因);`retractStatus`(string,撤回状态 空 为可撤回 wait等待撤回,success成功 fail 失败);`createTime`(int64,消息的创建时间);`msgType`(string,消息类型);`text`(MessageText,文本消息);`image`(MessageImage,图片消息);`sticker`(MessageSticker,表情消息);`video`(MessageVideo,视频消息);... |
|
||||
| 消息记录列表(待确认需求) | `POST /api/bot/wx/msg/record/list` | `page`(int64, 可选);`pageSize`(int64, 可选);`botId`(int32, 可选);`groupId`(int32, 可选);`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated MsgRecord);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 消息撤回 | `POST /api/bot/wx/msg/record/retract` | `id`(int64, 可选);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 分组-创建 | `POST /api/bot/wx/category/add` | `name`(string, 必填,分组的名字);`botType`(int32, 必填,类型 1 个微 2企微) | `id`(int64,id) |
|
||||
| 分组-更新 | `POST /api/bot/wx/category/update` | `id`(int64, 必填,分组id);`name`(string, 必填,分组名字);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 分组-删除 | `POST /api/bot/wx/category/del` | `id`(int64, 必填,分组id);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 分组-列表 | `POST /api/bot/wx/category/list` | `page`(int64, 可选,page);`pageSize`(int64, 可选,pageSize);`name`(string, 可选,分组名字);`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated CategoryItem,分组列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 分组-添加机器人 | `POST /api/bot/wx/category/botAdd` | `id`(int64, 必填,分组id);`botIds`(repeated int64, 必填,组内-机器人id列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 分组-删除机器人 | `POST /api/bot/wx/category/botDel` | `id`(int64, 必填,分组id);`botIds`(repeated int64, 必填,组内-机器人id列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 子账号拥有的机器人列表 | `POST /api/bot/wx/user/list` | `userId`(int64, 必填,子账号id);`page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`botName`(string, 可选,机器人名字);`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated HttpBotInfo,组内群列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 修改机器人描述 | `POST /api/bot/wx/remark/update` | `id`(int64, 必填,机器人id);`remark`(string, 必填,备注);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 修改机器人备注名 | `POST /api/bot/wx/name/update` | `id`(int64, 必填,机器人id);`name`(string, 必填,别名);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 消息发送统计-根据日期 | `POST /api/bot/wx/stats/msgSendData/byDate` | `date`(string, 可选,日期,不传默认为今日);`botId`(int64, 必填,机器人id);`botType`(int32, 必填,类型 1 个微 2企微) | `msgNum`(int64,消息发送数量);`groupNum`(int64,在多少个群发送);`friendNum`(int64,给多少个好友发消息);`planNum`(int64,参与计划数) |
|
||||
| 检查机器人在线状态 | `POST /api/bot/wx/checkOnline` | `ids`(repeated int64, 必填,检查的ids);`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated CheckResultItem,结果) |
|
||||
| 更新机器人信息 | `POST /api/bot/wx/updateInfo` | `ids`(repeated int64, 必填,检查的ids);`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated ResultItem,结果) |
|
||||
| 分组-排序 | `POST /api/bot/wx/category/sort` | `list`(repeated HttpCategorySortItem, 必填,列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 获取机器人的个人二维码 | `POST /api/bot/wx/user/qrCode` | `style`(int32, 必填,选择样式);`botId`(int64, 必填,机器人id);`botType`(int32, 必填,1个微 2 企微);`wxid`(string, 可选,微号的wxid) | 空对象或无业务数据 |
|
||||
| 云端-获取登录二维码 | `POST /api/bot/wx/login/getQrcode` | `botKey`(string, 必填,botKey);`addressId`(string, 可选,代理的城市代码);`loginType`(int64, 必填,登录类型 0默认服务器登录 1 微蜂的app登录);`botType`(int32, 必填,机器人类型 1是个微 2是企微);`clientVersion`(string, 必填,客户端版本 4.1.12 和 4.1.16);`clientPlatform`(int32, 必填,客户端平台类型 1 mac 2 pc 3 ipad);`token`(string, 可选,h5获取二维码的时候,授权token) | `code`(string,登录码);`expireTime`(int64,二维码的过期时间 多少秒) |
|
||||
| 云端-获取登录二维码登录状态 | `POST /api/bot/wx/login/scanStatus` | `botKey`(string, 必填,botKey);`botType`(int32, 必填,机器人类型 1是个微 2是企微) | `wxStatus`(int32,扫码状态,1 等待 2 成功 4取消);`authStatus`(int32,授权状态 1成功 2失败);`failReason`(string,失败原因);`needVerifyCode`(bool,是否需要登录验证码);`authUrl`(string,验证链接);`loginAuthParam`(LoginAuthParam,登录验证参数);`authQrcode`(string,验证二维码 app扫码) |
|
||||
| 云端-新登录发送验证码 | `POST /api/bot/wx/login/codeVerify` | `botKey`(string, 必填,botKey);`botType`(int32, 必填,机器人类型 1是个微 2是企微);`code`(string, 必填,验证码) | 空对象或无业务数据 |
|
||||
| 退出登录 | `POST /api/bot/wx/logout` | `botKey`(string, 必填,botKey);`botType`(int32, 必填,机器人类型 1是个微 2是企微) | 空对象或无业务数据 |
|
||||
| 获取账号下的所有企微号的所在主体,需要主体id则需要从这里获取 | `POST /api/bot/wx/corp/list` | `{}` | `list`(repeated CorpInfoItem) |
|
||||
| 更新微号的状态 | `POST /api/bot/wx/updateBotStatus` | `botId`(int64, 必填,微号id);`botStatus`(int32, 必填,微号状态 0正常 1封禁);`botType`(int32, 必填,机器人类型 1是个微 2是企微) | 空对象或无业务数据 |
|
||||
| 微号管理-清空所有指令 | `POST /api/bot/wx/cleanAll/cmd` | `botId`(int64, 必填,微号id);`botType`(int32, 必填,机器人类型 1是个微 2是企微) | 空对象或无业务数据 |
|
||||
| 微号扫码添加好友 | `POST /api/bot/wx/scanQrcode/addFriend` | `botId`(int64, 必填,微号id);`botType`(int64, 必填,机器人类型 1是个微 2企微) | 空对象或无业务数据 |
|
||||
| 迁移微号 | `POST /api/bot/wx/transferBot` | `botIds`(repeated int64, 可选);`targetAccountId`(int64, 可选);`botType`(int32, 可选) | `successIds`(repeated int64,成功Id列表);`failList`(repeated failItem,失败列表) |
|
||||
| 联系人统计,目前只有客户数 | `POST /api/bot/wx/contactStats` | `ids`(repeated int64, 可选);`botType`(int32, 必填,机器人类型 1是个微 2是企微) | `list`(repeated ContactStatsStatsItem,列表) |
|
||||
| 登录码-自动登录 | `POST /api/bot/wx/login/autoLogin` | `botKey`(string, 必填,botKey);`botType`(int32, 必填,机器人类型 1是个微 2是企微);`addressId`(string, 可选,代理地址) | 空对象或无业务数据 |
|
||||
| 登录码-推送确认登录 | `POST /api/bot/wx/login/push/confirmLogin` | `botKey`(string, 必填,botKey);`botType`(int32, 必填,机器人类型 1是个微 2是企微) | 空对象或无业务数据 |
|
||||
| 解除微号异常 | `POST /api/bot/wx/releaseAbnormal` | `botIds`(repeated int64, 必填,微号ids);`botType`(int32, 必填,机器人类型 1是个微 2是企微) | 空对象或无业务数据 |
|
||||
| 微号管理-微号休眠状态变更 | `POST /api/bot/wx/sleep/update` | `botIds`(repeated int64, 必填,微号id);`isSleep`(bool, 必填,是否休眠 true 是 false 否);`botType`(int32, 可选) | `list`(repeated HttpWxbotSleepStatusUpdateItem) |
|
||||
| 微号管理-微号扫码进群 | `POST /api/bot/wx/scanQrcode/joinGroup` | `botId`(int64, 必填,微号id);`botType`(int64, 必填,机器人类型 1是个微 2企微);`qrcodeUrl`(string, 可选,二维码的链接);`groupUrl`(string, 可选,二维码扫描出来的群链接) | 空对象或无业务数据 |
|
||||
| 云端h5-获取登录二维码 | `POST /api/bot/wx/login/h5/getQrcode` | `botKey`(string, 必填,botKey);`addressId`(string, 可选,代理的城市代码);`loginType`(int64, 必填,登录类型 0默认服务器登录 1 微蜂的app登录);`botType`(int32, 必填,机器人类型 1是个微 2是企微);`clientVersion`(string, 必填,客户端版本 4.1.12 和 4.1.16);`clientPlatform`(int32, 必填,客户端平台类型 1 mac 2 pc 3 ipad);`token`(string, 可选,h5获取二维码的时候,授权token) | `code`(string,登录码);`expireTime`(int64,二维码的过期时间 多少秒) |
|
||||
| 云端h5-获取登录二维码登录状态 | `POST /api/bot/wx/login/h5/scanStatus` | `botKey`(string, 必填,botKey);`botType`(int32, 必填,机器人类型 1是个微 2是企微) | `wxStatus`(int32,扫码状态,1 等待 2 成功 4取消);`authStatus`(int32,授权状态 1成功 2失败);`failReason`(string,失败原因);`needVerifyCode`(bool,是否需要登录验证码);`authUrl`(string,验证链接);`loginAuthParam`(LoginAuthParam,登录验证参数);`authQrcode`(string,验证二维码 app扫码) |
|
||||
| 云端h5-新登录发送验证码 | `POST /api/bot/wx/login/h5/codeVerify` | `botKey`(string, 必填,botKey);`botType`(int32, 必填,机器人类型 1是个微 2是企微);`code`(string, 必填,验证码) | 空对象或无业务数据 |
|
||||
| 云端h5-唤醒登录 | `POST /api/bot/wx/login/h5/autoLogin` | `botKey`(string, 必填,botKey);`botType`(int32, 必填,机器人类型 1是个微 2是企微);`addressId`(string, 可选,代理地址) | 空对象或无业务数据 |
|
||||
| 微号管理-修改微号头像 | `POST /api/bot/wx/user/modifyHeadImg` | `botId`(int64, 必填,微号id);`botType`(int32, 必填,微号类型) | `link`(string,头像链接) |
|
||||
| 微号管理-修改微号别名(仅支持企微云端号,本地号没有,个微号也没有) | `POST /api/bot/wx/user/modifyAliasName` | `id`(int64, 必填,微号id);`aliasName`(string, 必填,别名) | 空对象或无业务数据 |
|
||||
| 微号管理-刷新wstoken | `POST /api/bot/wx/user/refreshWsToken` | `botId`(int64, 必填,微号id);`botType`(int32, 必填,微号类型) | `token`(string,token) |
|
||||
|
||||
|
||||
## 常用示例
|
||||
|
||||
查询微号列表:
|
||||
|
||||
```bash
|
||||
htsy-cli call /api/bot/wx/list -d '{"page":1,"pageSize":20,"botType":1}'
|
||||
```
|
||||
|
||||
发送文本消息:
|
||||
|
||||
```bash
|
||||
htsy-cli call /api/bot/wx/msg/send -d '{"botId":1001,"targetId":2002,"targetType":"friend","botType":1,"msgType":"text","text":{"content":"hello"}}'
|
||||
```
|
||||
|
||||
创建分组并添加微号:
|
||||
|
||||
```bash
|
||||
htsy-cli call /api/bot/wx/category/add -d '{"name":"测试分组","botType":1}'
|
||||
htsy-cli call /api/bot/wx/category/botAdd -d '{"id":10,"botIds":[1001,1002],"botType":1}'
|
||||
```
|
||||
|
||||
获取登录二维码并查询状态:
|
||||
|
||||
```bash
|
||||
htsy-cli call /api/bot/wx/login/getQrcode -d '{"botKey":"BOT_KEY","loginType":0,"botType":1,"clientVersion":"4.1.16","clientPlatform":2}'
|
||||
htsy-cli call /api/bot/wx/login/scanStatus -d '{"botKey":"BOT_KEY","botType":1}'
|
||||
```
|
||||
@@ -0,0 +1,55 @@
|
||||
# 通用字段与消息体
|
||||
|
||||
## 调用与返回约定
|
||||
|
||||
所有业务接口通过 `htsy-cli call <接口路径> -d '<JSON>'` 调用。空请求体使用 `{}`。接口返回通常由网关包装为成功响应,文档中的“常用返回字段”指 `data` 内部字段。
|
||||
|
||||
通用字段:
|
||||
|
||||
| 字段 | 说明 |
|
||||
| --- | --- |
|
||||
| `page`, `pageSize` | 分页页码和每页数量,通常从 `1` 开始。 |
|
||||
| `botType` | 微号类型:`1` 个微,`2` 企微。 |
|
||||
| `codeType` | 席位/授权码类型:常见 `1` 客户端/本地,`2` 协议/云端。 |
|
||||
| `botId` | 微号机器人 ID。 |
|
||||
| `botKey` | 席位码/授权码。 |
|
||||
| `wxid` | 微信实体 ID,可指客户、群或微号自身。 |
|
||||
| `targetType` | 发送目标类型,常见 `friend` 客户、`group` 群。 |
|
||||
| 时间字段 | 未特别说明时按毫秒时间戳处理。 |
|
||||
|
||||
## `api.common.Message`
|
||||
|
||||
用于消息发送、素材、话术、群发、SOP 等场景。顶层字段:`msgType` 必填;根据 `msgType` 只填对应消息体字段,例如 `text`、`image`、`link`。
|
||||
|
||||
| `msgType` | 消息体字段 | 字段说明 |
|
||||
| --- | --- | --- |
|
||||
| `text` | `text` | `content` 文本内容;`atList` 客户 ID 列表;`at` at 字符串列表。 |
|
||||
| `image` | `image` | `link` 图片链接。 |
|
||||
| `sticker` | `sticker` | `link` 表情链接。 |
|
||||
| `video` | `video` | `link` 视频链接。 |
|
||||
| `audio` | `audio` | `link` 语音链接;可选 `fileId`, `size`, `voiceTime`, `aesKey`, `md5`。 |
|
||||
| `file` | `file` | `link` 文件链接;`fileName` 指定文件名。 |
|
||||
| `link` | `link` | `title`, `link`, `imgUrl`, `desc`。 |
|
||||
| `miniProgram` | `miniProgram` | `appid`, `pagePath`, `title`, `imgUrl`, `appIcon`, `appName`, `username`。 |
|
||||
| `group` | `group` | `id` 群 wxid;可选 `promotionalMsgList`, `promotionalMsgInterval`。 |
|
||||
| `inviteGroup` | `inviteGroup` | 入群邀请计划:`id`, `name`, `groups`, `rule`, `botType`, `type`, `autoStop`, `checkInGroup` 等。 |
|
||||
| `dialogue` | `dialogue` | `id` 话术库 ID。 |
|
||||
| `materialGroup` | `materialGroup` | 素材组列表,每项结构接近 `Message`,另有 `materialId`。 |
|
||||
| `freeVideo` | `freeVideo` | 视频号字段:`objectId`, `objectNonceId`, `userName`, `nickName`, `avatar`, `desc`, `thumbUrl`, `url`, `feedType`。 |
|
||||
| `liveBroadcastRoom` | `liveBroadcastRoom` | 直播间字段:`feedType`, `coverUrl`, `thumbUrl`, `avatar`, `nickname`, `desc`, `url`, `extras`, `objectId`, `objectNonceId`。 |
|
||||
| `bizCard` | `bizCard` | 名片消息,按业务返回的名片数据填写。 |
|
||||
| `note` | `note` | 笔记消息,按业务返回的笔记数据填写。 |
|
||||
|
||||
通用可选字段:`role` 角色名;`delayTime` 延迟毫秒;`delayType` 延迟单位 `s`/`m`/`h`;`materialId` 素材 ID;`traceId` 发送追踪;`top` 是否置顶;`quoteMessage`/`quoteId` 引用消息。
|
||||
|
||||
发送文本示例:
|
||||
|
||||
```bash
|
||||
htsy-cli call /api/bot/wx/msg/send -d '{"botId":1001,"targetId":2002,"targetType":"friend","botType":1,"msgType":"text","text":{"content":"hello"}}'
|
||||
```
|
||||
|
||||
发送链接示例:
|
||||
|
||||
```bash
|
||||
htsy-cli call /api/bot/wx/msg/send -d '{"botId":1001,"targetId":2002,"targetType":"friend","botType":1,"msgType":"link","link":{"title":"标题","link":"https://example.com","imgUrl":"https://example.com/a.jpg","desc":"描述"}}'
|
||||
```
|
||||
@@ -0,0 +1,66 @@
|
||||
# 客服与知识库
|
||||
|
||||
阅读本文件处理客服会话、客服消息、客服 AI、知识库、飞书配置、客服微号列表等操作。
|
||||
|
||||
## 客服接口
|
||||
|
||||
| 目标 | 接口 | 请求字段 | 常用返回字段 |
|
||||
| --- | --- | --- | --- |
|
||||
| 客服消息-发送 | `POST /api/customer/msg/send` | `chatType`(string, 必填,群group 好友 friend);`sender`(int64, 必填,接收者id);`botId`(int64, 必填,机器人Id);`botType`(int64, 必填,机器人类型);`msgType`(string, 必填,消息类型);`text`(MessageText, 可选,文本消息);`image`(MessageImage, 可选,图片消息);`sticker`(MessageSticker, 可选,表情消息);`video`(MessageVideo, 可选,视频消息);`audio`(MessageAudio, 可选,音频);`file`(MessageFile, 可选,文件);`compositeImage`(MessageCompositeImage, 可选,合成图消息);`miniProgram`(MessageMiniProgram, 可选,小程序消息);`link`(MessageLink, 可选,链接消息);`inviteGroup`(MessageInviteGroup, 可选,入群邀请 inviteGroup);`freeVideo`(MessageFreeVideo, 可选,视频号 freeVideo);`group`(MessageGroup, 可选,群号);`liveBroadcastRoom`(MessageLiveBroadcastRoom, 可选,直播间消息);`dialogue`(Dialogue, 可选,话术库id);`materialGroup`(repeated MaterialGroup, 可选,素材组);... 另有 5 个字段 | `message`(MessageItem,消息);`time`(int64,发送时间);`sender`(string,发送者的wxid, 有可能是botwxid,有可能是好友的wxid);`senderBot`(bool,是否是机器人);`senderAvatar`(string,发送者头像);`name`(string,昵称);`status`(string,状态);`failReason`(string,原因);`msgId`(string,消息id);`wxMsgId`(string,微信的msgId);... |
|
||||
| 消息撤回 | `POST /api/customer/msg/retract` | `chatType`(string, 必填,群group 好友 friend);`sender`(int64, 必填,接收者id);`botId`(int64, 必填,机器人Id);`botType`(int64, 必填,机器人类型);`msgId`(string, 必填,微信官方的msgID) | 空对象或无业务数据 |
|
||||
| 发送话术库 | `POST /api/customer/msg/send/dialogue` | `chatType`(string, 必填,群group 好友 friend);`sender`(int64, 必填,接收者id);`botId`(int64, 必填,机器人Id);`botType`(int64, 必填,机器人类型);`msgType`(string, 必填,消息类型);`text`(MessageText, 可选,文本消息);`image`(MessageImage, 可选,图片消息);`sticker`(MessageSticker, 可选,表情消息);`video`(MessageVideo, 可选,视频消息);`audio`(MessageAudio, 可选,音频);`file`(MessageFile, 可选,文件);`compositeImage`(MessageCompositeImage, 可选,合成图消息);`miniProgram`(MessageMiniProgram, 可选,小程序消息);`link`(MessageLink, 可选,链接消息);`inviteGroup`(MessageInviteGroup, 可选,入群邀请 inviteGroup);`freeVideo`(MessageFreeVideo, 可选,视频号 freeVideo);`group`(MessageGroup, 可选,群号);`liveBroadcastRoom`(MessageLiveBroadcastRoom, 可选,直播间消息);`dialogue`(Dialogue, 可选,话术库id);`materialGroup`(repeated MaterialGroup, 可选,素材组);... 另有 5 个字段 | `list`(repeated MsgRecordItem,消息) |
|
||||
| 消息转发 | `POST /api/customer/msg/forward` | `chatType`(string, 必填,群group 好友 friend);`sender`(int64, 必填,接收者id);`botId`(int64, 必填,机器人Id);`botType`(int64, 必填,机器人类型);`message`(MessageItem, 必填,消息) | `message`(MessageItem,消息);`time`(int64,发送时间);`sender`(string,发送者的wxid, 有可能是botwxid,有可能是好友的wxid);`senderBot`(bool,是否是机器人);`senderAvatar`(string,发送者头像);`name`(string,昵称);`status`(string,状态);`failReason`(string,原因);`msgId`(string,消息id);`wxMsgId`(string,微信的msgId);... |
|
||||
| 客服会话-所有的消息对象 | `POST /api/customer/list` | `targetType`(string, 必填,不传默认都有:群group 好友 friend);`botId`(int64, 可选,可不传,用作筛选:机器人Id);`name`(string, 可选,可不传,用作筛选:名称);`msgType`(int64, 必填,0所有 1 已接待已读 2 接待中已读 3 接待中未读 4已接待 5接待中);`offset`(int64, 可选,上一次最后一条的开始时间);`start`(int64, 可选,从第几条开始);`limit`(int64, 可选,不传默认1万条,一次多少条);`customerUserId`(int64, 可选,客服账号id,只有主账号请求有效);`isCollect`(bool, 可选,true 筛选出收藏的客户);`tag`(repeated int64, 可选,标签);`qwTag`(repeated string, 可选,企微标签 第一个主体 后面接标签值) | `list`(repeated MsgItem);`offset`(int64,最后一条消息的时间戳);`last`(bool,是否已结束);`total`(int64,总数) |
|
||||
| 客服会话-所有的消息对象中进行搜索 | `POST /api/customer/list/search` | `targetType`(string, 必填,不传默认都有:群group 好友 friend);`targetId`(int64, 可选,可不传,用作筛选:群groupID 好友 friendId);`botId`(int64, 可选,可不传,用作筛选:机器人Id);`name`(string, 可选,可不传,用作筛选:名称);`msgType`(int64, 必填,0所有 1 已接待已读 2 接待中已读 3 接待中未读 4已接待 5接待中);`start`(int64, 必填,从第几条开始);`limit`(int64, 必填,不传默认1万条,一次多少条);`customerUserId`(int64, 可选,客服账号id,只有主账号请求有效);`tag`(repeated int64, 可选,标签);`qwTag`(repeated string, 可选,企微标签 第一个主体 后面接标签值) | `list`(repeated MsgSearchItem);`offset`(int64,最后一条消息的时间戳);`last`(bool,是否已结束);`total`(int64,总数) |
|
||||
| 客服会话-某个消息对象的聊天记录 | `POST /api/customer/record/list` | `startTime`(int64, 必填,开始时间);`endTime`(int64, 必填,结束时间);`offset`(int64, 必填,上一次最后一条的开始时间);`limit`(int64, 必填,一次多少条);`nextId`(int64, 必填,下一个id);`ids`(string, 必填,botID_FriendId_GroupId) | `list`(repeated MsgRecordItem,记录列表);`offset`(int64,最后一条消息的时间戳);`last`(bool,是否已结束);`total`(int64,总数);`nextId`(int64,下一个id) |
|
||||
| 客服会话-获取聊天界面的群或者客户的最新一条数据 | `POST /api/customer/latest` | `customerUserId`(int64, 可选,客服账号id,只有主账号请求有效);`idList`(repeated string, 必填,[]botID_FriendId_GroupId) | `list`(repeated MsgLatestReplyItem) |
|
||||
| 客服会话-改变同一条聊天记录的接待状态 | `POST /api/customer/msg/change` | `msgType`(int64, 必填,1 已接待已读 2 接待中已读 3 接待中未读 4已接待 5接待中);`ids`(string, 必填,botID_FriendId_GroupId) | `msgType`(int64,改变后的状态 1 已接待已读 2 接待中已读 3 接待中未读 4已接待 5接待中) |
|
||||
| 客服会话-标记这条消息已读 | `POST /api/customer/msg/read` | `sendTime`(int64, 可选,发送时间);`ids`(string, 必填,botID_FriendId_GroupId) | 空对象或无业务数据 |
|
||||
| 根据senderInfo获取 | `POST /api/customer/sender/info` | `senders`(repeated string, 必填,格式为: sender-bot 或者 sender-friend 或者 sender-group) | `senderList`(repeated SenderInfo,发送者的info) |
|
||||
| 客服会话-根据cdn参数下载资源 | `POST /api/customer/download` | `cdnType`(int32, 必填,c2c 2 微信:);`qwCdn`(QwCdn, 可选);`msgType`(string, 可选);`botId`(int64, 可选);`traceId`(string, 可选,聊天记录的traceId);`chatType`(string, 可选,聊天类型) | `link`(string) |
|
||||
| 客服会话-客服转接 | `POST /api/customer/switch` | `userId`(int64, 必填,转接给哪一个用户的用户id);`ids`(repeated string, 必填,转接的对象;botId_friendId_GroupId) | `fail`(string);`failList`(repeated string) |
|
||||
| 客服配置-添加关键词过滤,客户过滤,接收群设置 | `POST /api/customer/config/add` | `userId`(int64, 必填,子账号);`groupRange`(repeated int64, 可选,监听退群进群事件的群范围);`friendFilter`(repeated int64, 可选,需要过滤的客户);`friendRange`(repeated int64, 可选,只接收的客户);`keyWordRule`(repeated keyWordRuleItem, 可选,关键词规则:eg:[{"content":"文本","type":"eq"}]);`tagRange`(repeated string, 可选,只接收拥有这个标签的客户);`allocationUpperLimit`(int64, 可选,接待上限);`isRealRead`(bool, 可选,是否点到企微的未读);`config`(google.protobuf.Value, 可选,个人配置);`filters`(repeated Filter, 可选,条件筛选);`receivedAutoDel`(receiveAutoDelItem, 可选,已接待自动延时或者立即删除);`receiveGroupRange`(map<int64, int64>, 可选,设置客服接待的客户群,以及指定客户群的监听的微号);`receptionTimeRange`(repeated ReceptionTimeRangeItem, 可选,上班时间范围);`defaultReplyList`(repeated DefaultReply, 可选,默认回复) | 空对象或无业务数据 |
|
||||
| 客服配置-主账号获取子账号自身的配置 | `POST /api/customer/config/get` | `userId`(int64, 可选) | `id`(int64,id);`accountId`(int64,主账号id);`userId`(int64,子账号id);`groupRange`(repeated int64,可见群);`friendFilter`(repeated int64,需要过滤的客户);`friendRange`(repeated int64,只接收的客户);`keyWordRule`(repeated keyWordRuleItem,关键词规则:eg:[{"content":"文本","type":"eq"}]);`tagRange`(repeated string,只接收拥有这个标签的客户);`allocationUpperLimit`(int64,接待上限);`username`(string,账号);... |
|
||||
| 客服配置-子账号获取自身的配置 | `POST /api/customer/config/getByUserId` | `{}` | `id`(int64,id);`accountId`(int64,主账号id);`userId`(int64,子账号id);`groupRange`(repeated int64,可见群);`friendFilter`(repeated int64,需要过滤的客户);`friendRange`(repeated int64,只接收的客户);`keyWordRule`(repeated keyWordRuleItem,关键词规则:eg:[{"content":"文本","type":"eq"}]);`tagRange`(repeated string,只接收拥有这个标签的客户);`allocationUpperLimit`(int64,接待上限);`username`(string,账号);... |
|
||||
| 客服配置-子账号设置自己的个人设置 | `POST /api/customer/config/user/set` | `config`(google.protobuf.Value, 可选,个人配置);`isRealRead`(bool, 可选,是否点到企微的未读) | 空对象或无业务数据 |
|
||||
| 客服配置-根据id删除相关配置 | `POST /api/customer/config/del` | `id`(int64, 可选) | 空对象或无业务数据 |
|
||||
| 客服配置-对客服配置进行更新 | `POST /api/customer/config/update` | `id`(int64, 必填,id);`userId`(int64, 必填,子账号);`groupRange`(repeated int64, 可选,可见群);`friendFilter`(repeated int64, 可选,需要过滤的客户);`friendRange`(repeated int64, 可选,只接收的客户);`keyWordRule`(repeated keyWordRuleItem, 可选,关键词规则:eg:[{"content":"文本","type":"eq"}]);`tagRange`(repeated string, 可选,只接收拥有这个标签的客户);`allocationUpperLimit`(int64, 可选,接待上限);`isRealRead`(bool, 可选,是否点到企微的未读);`config`(google.protobuf.Value, 可选,个人配置);`filters`(repeated Filter, 可选,条件筛选);`receivedAutoDel`(receiveAutoDelItem, 可选,已接待自动延时或者立即删除);`receiveGroupRange`(map<int64, int64>, 可选,设置客服接待的客户群,以及指定客户群的监听的微号);`receptionTimeRange`(repeated ReceptionTimeRangeItem, 可选,上班时间范围);`defaultReplyList`(repeated DefaultReply, 可选,默认回复) | 空对象或无业务数据 |
|
||||
| 客服配置-获取客服配置列表 | `POST /api/customer/config/list` | `page`(int64, 可选);`pageSize`(int64, 可选) | `list`(repeated CustomerConfigItem);`total`(int64);`last`(bool);`page`(int64);`pageSize`(int64) |
|
||||
| 客服配置-批量更新客服分配上限 | `POST /api/customer/config/batch/allocationUpperLimit` | `list`(repeated HttpCustomerBatchUpdateAllocationUpperLimitItem, 可选) | 空对象或无业务数据 |
|
||||
| 客服配置-变更客服的状态 | `POST /api/customer/config/update/status` | `userId`(int64, 必填,暂留字段 给主账号使用);`status`(int64, 必填,0 离线 1 在线) | `status`(int64,0 离线 1 在线) |
|
||||
| 客服工具栏-获取工具栏列表 | `POST /api/customer/tool/list` | `page`(int64, 可选);`pageSize`(int64, 可选) | `list`(repeated CustomerToolItem);`total`(int64);`last`(bool);`page`(int64);`pageSize`(int64) |
|
||||
| 客服工具栏-工具栏列表新增 | `POST /api/customer/tool/add` | `name`(string, 可选);`link`(string, 可选) | `id`(int64) |
|
||||
| 客服工具栏-工具栏列表更新 | `POST /api/customer/tool/update` | `id`(int64, 可选,id);`name`(string, 可选,工具栏名称);`link`(string, 可选,工具链接);`switch`(bool, 可选,是否开启);`sortValue`(int64, 可选,排序值,值越大在越前面) | 空对象或无业务数据 |
|
||||
| 客服工具栏-工具栏列表排序 | `POST /api/customer/tool/sort` | `list`(repeated ToolItem, 可选) | 空对象或无业务数据 |
|
||||
| 客服工具栏-工具栏列表删除 | `POST /api/customer/tool/del` | `id`(int64, 可选) | 空对象或无业务数据 |
|
||||
| 客服工具栏-工具栏开关 | `POST /api/customer/tool/switch` | `id`(int64, 可选);`switch`(bool, 可选) | 空对象或无业务数据 |
|
||||
| 客服会话-批量删除接待列表中对象 | `POST /api/customer/msg/del` | `idList`(repeated string, 必填,[]botID_FriendId_GroupId) | 空对象或无业务数据 |
|
||||
| 客服会话-语音消息转文字 | `POST /api/customer/msg/voice/convert` | `ids`(string, 必填,botId_friendId_GroupId);`msgId`(string, 必填,消息id) | `text`(string) |
|
||||
| 客服会话-查看账号下的客服消息 | `POST /api/customer/info` | `userId`(int64, 可选,可以查询某个客服下的情况,userId为0就是未分配的客户) | `userId`(int64,客服账号id);`total`(int64,总数);`receive`(int64,接待中);`received`(int64,已接待);`nickName`(string,客服名称);`avatar`(string,客服头像);`receiveList`(repeated string,接待中对象);`receivedList`(repeated string,已接待对象);`isOnLine`(bool,是否在线) |
|
||||
| 客服会话-统计账号下的客服消息 | `POST /api/customer/info/count` | `{}` | `total`(int64,总数);`allocated`(int64,已分配数);`undistributed`(int64,未分配数);`customerList`(repeated CustomerInfoItem,账号下的客服列表) |
|
||||
| 客服会话-设置为收藏 | `POST /api/customer/set/collect` | `isCollect`(bool, 可选,是否收藏);`ids`(string, 必填,botID_FriendId_GroupId) | 空对象或无业务数据 |
|
||||
| 客服会话-客服系统未分配的详情 | `POST /api/customer/info/count/unDistributed` | `{}` | `list`(repeated CustomerUnDistributedItem) |
|
||||
| 客服会话-主动接待客户 | `POST /api/customer/friend/receive` | `chatType`(string, 可选,群group 好友 friend);`friendId`(int64, 可选,客户id);`groupId`(int64, 可选,群id);`botId`(int64, 可选,机器人的id);`userId`(int64, 可选,客服id);`isForced`(bool, 可选,是否强制接待 默认为是) | 空对象或无业务数据 |
|
||||
| 客服统计-按时间范围查询 | `POST /api/customer/info/statistics` | `startTime`(int64, 可选);`endTime`(int64, 可选) | `list`(repeated StatisticsDataItem) |
|
||||
| 客服统计-主动调用统计接口 | `POST /api/customer/info/statisticsByDate` | `dateTime`(int64, 可选) | 空对象或无业务数据 |
|
||||
| 账号配置-列表 | `POST /api/customer/config/group/info` | `{}` | `id`(int64,id);`botList`(CustomerConfigGroupBotItem,过滤的微号);`friendList`(repeated int64,需要过滤的客户);`corpList`(repeated string,需要过滤的主体);`whiteListGroup`(repeated int64,白名单群Id);`keyWordRule`(repeated keyWordRuleItem,关键词规则:eg:[{"content":"文本","type":"eq"}]);`groupMemberList`(repeated int64,需要过滤的群成员ids);`friendAndGroupWxids`(repeated string,需要过滤的客户和群成员wxids);`linkFilter`(repeated LinkFilterItem,链接过滤);`miniProgramFilter`(repeated MiniProgramFilterItem,小程序过滤);... |
|
||||
| 账号配置-分页加载过滤客户 | `POST /api/customer/config/group/filterFriend` | `page`(int64, 可选);`pageSize`(int64, 可选);`botType`(int64, 可选);`name`(string, 可选) | `friendList`(repeated string,需要过滤的客户);`total`(int64);`last`(bool);`page`(int64);`pageSize`(int64) |
|
||||
| 账号配置-设置过滤的企微号 | `POST /api/customer/config/group/add/bot` | `botIds`(repeated int64, 必填,需要过滤的企微id) | 空对象或无业务数据 |
|
||||
| 账号配置-设置过滤的客户 | `POST /api/customer/config/group/add/friend` | `friendIds`(repeated int64, 必填,需要过滤的客户id);`FriendAndGroupMemberWxids`(repeated string, 必填,需要过滤的客户或者群成员的wxid);`wxFriendAndGroupMemberWxids`(repeated string, 必填,个微-需要过滤的客户或者群成员的wxid) | 空对象或无业务数据 |
|
||||
| 账号配置-移除过滤的客户 | `POST /api/customer/config/group/del/friend` | `friendIds`(repeated int64, 必填,需要过滤的客户id);`FriendAndGroupMemberWxids`(repeated string, 必填,需要过滤的客户或者群成员的wxid);`wxFriendAndGroupMemberWxids`(repeated string, 必填,个微-需要过滤的客户或者群成员的wxid) | 空对象或无业务数据 |
|
||||
| 账号配置-设置放行的企微客户 | `POST /api/customer/config/group/release/qwFriend` | `qwFriendWxids`(repeated string, 必填,需要放行的企微);`isDel`(bool, 必填,是否删除) | 空对象或无业务数据 |
|
||||
| 账号配置-更新 | `POST /api/customer/config/group/update` | `id`(int64, 可选,id);`botList`(CustomerConfigGroupBotItem, 可选,过滤的微号);`friendList`(repeated int64, 可选,需要过滤的客户);`corpList`(repeated string, 可选,需要过滤的主体);`keyWordRule`(repeated keyWordRuleItem, 可选,关键词规则:eg:[{"content":"文本","type":"eq"}]);`groupMemberList`(repeated int64, 可选,需要过滤的群成员ids);`friendAndGroupWxids`(repeated string, 可选,需要过滤的客户和群成员wxids);`linkFilter`(repeated LinkFilterItem, 可选,链接过滤);`miniProgramFilter`(repeated MiniProgramFilterItem, 可选,小程序过滤);`freeVideoFilter`(repeated FreeVideoFilterItem, 可选,视频号过滤);`wxFriendAndGroupWxids`(repeated string, 可选,个微需要过滤的客户和群成员wxids);`Allocation`(string, 可选,分配模式 auto 自动 manual 手动);`qwFriendWxids`(repeated string, 必填,需要放行的企微) | 空对象或无业务数据 |
|
||||
| 客服配置-批量设置工作时间和默认回复 | `POST /api/customer/config/defaultReply/batch` | `userIds`(repeated int64, 必填,userIds);`receptionTimeRange`(repeated ReceptionTimeRangeItem, 可选,上班时间范围);`defaultReplyList`(repeated DefaultReply, 可选,默认回复) | 空对象或无业务数据 |
|
||||
| 客服-重新分配接待池 | `POST /api/customer/reallocate` | `userIds`(repeated int64, 必填,按子账号重新分配);`botIds`(repeated int64, 必填,指定微号的客户重新分配) | 空对象或无业务数据 |
|
||||
| 客服-ai回复 | `POST /api/customer/ai/reply` | `ids`(string, 必填,botID_FriendId_GroupId) | `content`(string,回复) |
|
||||
| 微号列表 | `POST /api/bot/list` | `botType`(int32, 必填,微号类型 1 个微 2 企微);`status`(int64, 可选,在线状态 在线状态 0未接入 1 离线 2 过期 3 在线);`keyword`(string, 可选,搜索的微号名字);`accountId`(int64, 必填,账号id) | `list`(repeated BotInfo,列表) |
|
||||
| 海豚私域客服,用于回复海豚私域产品。 海豚私域是一款完善且高效的私域流量管理运营产品,帮助客户更加高效地管理私域客户。是企业微信在私域方面的补充。 | `POST /api/aiReply` | `query`(string, 必填,问题) | `answer`(string,回答) |
|
||||
|
||||
|
||||
## 常用示例
|
||||
|
||||
```bash
|
||||
htsy-cli call /api/customer/chat/list -d '{"page":1,"pageSize":20}'
|
||||
htsy-cli call /api/customer/message/list -d '{"page":1,"pageSize":20}'
|
||||
htsy-cli call /api/bot/list -d '{"page":1,"pageSize":20,"botType":1}'
|
||||
```
|
||||
@@ -0,0 +1,87 @@
|
||||
# 客户、联系人与标签
|
||||
|
||||
阅读本文件处理客户列表、客户详情、同步、备注、单向客户、黑名单、客户标签、企微官方标签等操作。
|
||||
|
||||
## 客户与联系人
|
||||
|
||||
| 目标 | 接口 | 请求字段 | 常用返回字段 |
|
||||
| --- | --- | --- | --- |
|
||||
| 行为日志列表 | `POST /api/wx/friend/activitylog/list` | `page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pageSize);`friendId`(int64, 可选,客户id ,为空则为整个账号的);`type`(int32, 可选,根据类型筛选) | `list`(repeated Info,客户信息);`page`(int64);`pageSize`(int64);`total`(int64,总数);`last`(bool,是否最后一页) |
|
||||
| 黑名单-列表 | `POST /api/wx/friend/blacklist/list` | `page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pageSize) | `list`(repeated BlacklistInfo,客户信息);`page`(int64);`pageSize`(int64);`total`(int64,总数);`last`(bool,是否最后一页) |
|
||||
| 黑名单-添加 | `POST /api/wx/friend/blacklist/add` | `friendId`(int64, 必填,客户id) | `id`(int64) |
|
||||
| 黑名单-添加到企微群聊黑名单(通常用这个将客户剔除群聊) | `POST /api/wx/friend/blacklist/addQw` | `friendWxid`(string, 必填,好友wxid);`botId`(int64, 可选,机器人id);`status`(int64, 必填,状态 1拉黑 0移出);`botWxid`(string, 可选,机器人wxid 优先判断botId,botid和botwxid 2选1) | 空对象或无业务数据 |
|
||||
| 黑名单-删除 | `POST /api/wx/friend/blacklist/del` | `friendId`(int64, 必填,客户id);`id`(int64, 必填,黑名单id) | 空对象或无业务数据 |
|
||||
| 黑名单数据包-同步黑名单 | `POST /api/wx/friend/blacklist/sync` | `packageId`(int64, 必填,黑名单包id) | 空对象或无业务数据 |
|
||||
| 黑名单数据包-列表 | `POST /api/wx/friend/blacklist/package/list` | `{}` | `list`(repeated PackageInfo,list) |
|
||||
| 黑名单数据包-开关 | `POST /api/wx/friend/blacklist/package/switch` | `packageId`(int64, 必填,包的id);`switch`(bool, 必填,开关) | 空对象或无业务数据 |
|
||||
| 黑名单数据包-客户列表 | `POST /api/wx/friend/blacklist/package/friendList` | `page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pageSize);`packageId`(int64, 必填,包id);`wxid`(string, 可选,好友的wxid);`nickName`(string, 可选,好友的昵称) | `list`(repeated BlacklistInfo,客户信息);`page`(int64);`pageSize`(int64);`total`(int64,总数);`last`(bool,是否最后一页) |
|
||||
| 客户列表 | `POST /api/wx/friend/list` | `page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pageSize);`name`(string, 可选,昵称搜索);`botType`(int32, 必填,类型 1 个微 2企微);`ids`(repeated int64, 可选,ids,客户ids);`botId`(int64, 可选,机器人id);`botIds`(repeated int64, 可选,机器人ids);`corpId`(string, 必填,主体id);`filters`(repeated TargetFilter, 可选,多筛选条件,且的关系);`inTagIds`(repeated int64, 可选,包含标签ids);`notInTagIds`(repeated int64, 可选,排除标签ids);`inQwTagIds`(repeated string, 可选,包含企微标签ids);`notInQwTagIds`(repeated string, 可选,排除企微标签ids);`threePartyService`(string, 可选,三方服务过滤部分字段使用);`groupRange`(repeated int64, 可选,所属群聊);`friendType`(int32, 可选,客户类型 1 个微 2 企微) | `list`(repeated FriendInfo,客户信息);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 通过客户wxId获取客户信息 | `POST /api/wx/friend/list/byWxid` | `wxids`(repeated string, 可选) | `list`(repeated FriendInfo,客户信息) |
|
||||
| 客户详情 | `POST /api/wx/friend/get` | `id`(int64, 必填,客户的id);`botType`(int64, 必填,个微还是企微);`botId`(int64, 可选,机器人id);`corpId`(string, 可选,主体id) | `id`(int64,id);`nickname`(string,昵称);`avatar`(string,头像);`wxid`(string,客户的wxid);`tagList`(repeated api.wx.wxgatewayfriendTag.Tag,标签列表);`sex`(int32,性别);`remark`(string,备注);`isBlack`(bool,是否是黑名单);`botFriendInfoList`(repeated FriendInfoByBot,和微号相关的信息);`groupFriendInfoList`(repeated FriendInfoByGroup,和群相关的信息);... |
|
||||
| 同步客户列表 | `POST /api/wx/friend/manualSync` | `botIds`(repeated int64, 必填,机器人id列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 同步内部联系人(仅限企微号) | `POST /api/wx/friend/inner/manualSync` | `botIds`(repeated int64, 必填,机器人id列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 内部联系人列表(仅限企微号) | `POST /api/wx/friend/inner/list` | `page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pageSize);`botType`(int32, 必填,类型 1 个微 2企微);`ids`(repeated int64, 可选,ids,客户ids);`wxids`(repeated string, 可选,wxids);`corpId`(string, 可选,主体id);`name`(string, 可选,按名称搜索) | `list`(repeated InnerFriendItem,内部联系人信息);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 内部联系人添加(仅限企微号) | `POST /api/wx/friend/inner/add` | `id`(int64, 必填,id);`nickname`(string, 必填,昵称);`avatar`(string, 可选,头像);`wxid`(string, 必填,客户的wxid);`sex`(int32, 可选,性别);`corpId`(string, 可选,主体id) | `id`(int64,id) |
|
||||
| 内部联系人删除(仅限企微号) | `POST /api/wx/friend/inner/del` | `wxid`(string, 必填,id);`corpId`(string, 必填,corpId) | 空对象或无业务数据 |
|
||||
| 内部联系人更新(仅限企微号) | `POST /api/wx/friend/inner/update` | `id`(int64, 必填,id);`nickname`(string, 必填,昵称);`avatar`(string, 可选,头像);`wxid`(string, 必填,客户的wxid);`sex`(int32, 可选,性别);`corpId`(string, 可选,主体id) | 空对象或无业务数据 |
|
||||
| 同步通信录 | `POST /api/wx/friend/contacts/sync` | `botIds`(repeated int64, 必填,机器人id);`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated SyncContactItem) |
|
||||
| 客户备注 | `POST /api/wx/friend/remark/set` | `friendId`(int64, 必填,客户id);`remark`(string, 必填,备注);`botType`(int64, 必填,个微还是企微);`botId`(int64, 必填,微号id) | 空对象或无业务数据 |
|
||||
| 客户拉黑企微 - 列表 | `POST /api/wx/friend/single/blacklist/list` | `page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pageSize);`botType`(int32, 必填,类型 1 个微 2企微);`botIds`(repeated int64, 可选,机器人ids);`corpId`(string, 可选,主体id);`nickname`(string, 可选,客户昵称筛选) | `list`(repeated HttpSingleBlackFriendItem,客户信息);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 客户拉黑企微-删除 | `POST /api/wx/friend/single/blacklist/del` | `ids`(repeated int64, 必填,客户微号的id) | 空对象或无业务数据 |
|
||||
| 单向客户列表 | `POST /api/wx/friend/singleList` | `page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pageSize);`botType`(int32, 必填,类型 1 个微 2企微);`botIds`(repeated int64, 可选,机器人ids);`nickname`(string, 可选,客户昵称筛选);`corpId`(string, 可选,主体id);`addTimeStart`(int64, 可选,添加时间开始);`addTimeEnd`(int64, 可选,添加时间结束);`timeStart`(int64, 可选,流失时间开始);`timeEnd`(int64, 可选,流失时间结束) | `list`(repeated HttpSingleFriendListItem,客户信息);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 单向客户同步 | `POST /api/wx/friend/single/sync` | `botId`(int64, 必填,微号id);`botType`(int64, 必填,微号类型) | 空对象或无业务数据 |
|
||||
| 单向客户删除 | `POST /api/wx/friend/single/del` | `ids`(repeated int64, 必填,客户微号的id) | 空对象或无业务数据 |
|
||||
| 客户删除 | `POST /api/wx/friend/deleteFriend` | `ids`(repeated int64, 必填,ids);`botId`(int64, 必填,botId);`botType`(int32, 必填,微号类型) | 空对象或无业务数据 |
|
||||
| 企微删除客户记录 - 列表 | `POST /api/wx/friend/del/recordList` | `page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pageSize);`botType`(int32, 必填,类型 1 个微 2企微);`botIds`(repeated int64, 可选,机器人ids);`corpId`(string, 可选,主体id);`nickname`(string, 可选,客户昵称筛选) | `list`(repeated HttpSingleFriendListItem,客户信息);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 单向客户删除记录 | `POST /api/wx/friend/single/delRecord` | `ids`(repeated int64, 必填,客户微号的id) | 空对象或无业务数据 |
|
||||
| 被动黑名单删除记录 | `POST /api/wx/friend/single/blacklist/delRecord` | `ids`(repeated int64, 必填,客户微号的id) | 空对象或无业务数据 |
|
||||
| 获取客户和群成员信息 | `POST /api/wx/friendAndGroup/info` | `friendAndGroupWxid`(repeated string, 必填,客户和群成员的wxid);`botType`(int64, 必填,微号类型) | `list`(repeated FriendAndGroupInfo) |
|
||||
| 获取客户的所属群信息 | `POST /api/wx/friend/info/group` | `ids`(repeated int64, 必填,客户的id);`botType`(int64, 必填,微号类型) | `list`(repeated FriendGroupInfoItem) |
|
||||
| 获取客户昵称头像信息 | `POST /api/wx/friend/baseInfo/byWxids` | `botType`(int32, 必填,微号类型);`wxids`(repeated string, 必填,wxids) | `list`(repeated FriendBaseInfo) |
|
||||
|
||||
|
||||
## 客户标签
|
||||
|
||||
| 目标 | 接口 | 请求字段 | 常用返回字段 |
|
||||
| --- | --- | --- | --- |
|
||||
| 自动打标-添加 | `POST /api/wx/friend/tag/autoPlan/add` | `name`(string, 必填,名字);`botType`(int32, 必填,类型 1 个微 2企微);`type`(string, 必填,打标计划的类型 quick event);`filters`(repeated TargetFilter, 必填,筛选条件);`tagIdList`(repeated int64, 必填,标签列表);`dynamicTag`(string, 必填,动态标签);`botIds`(repeated int64, 必填,微号ids);`qwTagIdList`(repeated string, 必填,企微标签ids);`corpId`(string, 必填,主体) | `id`(int64,id) |
|
||||
| 自动打标-删除 | `POST /api/wx/friend/tag/autoPlan/delete` | `id`(int64, 必填,id) | 空对象或无业务数据 |
|
||||
| 自动打标-列表 | `POST /api/wx/friend/tag/autoPlan/list` | `botType`(int32, 必填,类型 1 个微 2企微);`page`(int64, 可选,分页page);`pageSize`(int64, 可选,分页pageSize);`name`(string, 可选,计划名称);`status`(string, 可选,状态);`type`(string, 可选,计划类型 事件event 普通 quick) | `list`(repeated HttpAutoTagPlanDetailReply,标签列表);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 自动打标-详情 | `POST /api/wx/friend/tag/autoPlan/detail` | `id`(int64, 必填,id) | `name`(string,名字);`botType`(int32,类型 1 个微 2企微);`type`(string,打标计划的类型 manual);`filters`(repeated TargetFilter,筛选条件);`tagIdList`(repeated int64,标签列表);`id`(int64,id);`status`(string,状态);`tagList`(repeated api.wx.wxgatewayfriendTag.Tag,标签详情列表);`dynamicTag`(string,动态标签);`botIds`(repeated int64,微号ids);... |
|
||||
| 自动打标-预估人数 | `POST /api/wx/friend/tag/autoPlan/predictPeople` | `botType`(int32, 必填,类型 1 个微 2企微);`filters`(repeated TargetFilter, 必填,筛选条件);`botIds`(repeated int64, 可选,机器人id列表);`corpId`(string, 必填,主体id) | `num`(int64,人数) |
|
||||
| 自动打标-开关 | `POST /api/wx/friend/tag/autoPlan/switch` | `id`(int64, 必填,id);`status`(string, 必填,状态:[executing,stop]) | 空对象或无业务数据 |
|
||||
| 自动打标-更新 | `POST /api/wx/friend/tag/autoPlan/update` | `id`(int64, 必填,id);`name`(string, 必填,名字);`botType`(int32, 必填,类型 1 个微 2企微);`type`(string, 必填,打标计划的类型 quick event);`filters`(repeated TargetFilter, 必填,筛选条件);`tagIdList`(repeated int64, 必填,标签列表);`dynamicTag`(string, 必填,动态标签);`botIds`(repeated int64, 必填,botIds);`qwTagIdList`(repeated string, 必填,企微标签ids);`corpId`(string, 必填,主体) | 空对象或无业务数据 |
|
||||
| 自动打标-记录 | `POST /api/wx/friend/tag/autoPlan/record` | `botId`(int64, 可选,微号id);`status`(string, 可选,状态);`page`(int64, 可选,分页page);`pageSize`(int64, 可选,分页pageSize);`pid`(int64, 可选,计划id);`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated HttpAutoTagPlanRecordReplyItem,列表);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 自动打标-统计 | `POST /api/wx/friend/tag/autoPlan/record/count` | `botId`(int64, 可选,微号id);`pid`(int64, 可选,计划id) | `list`(repeated HttpAutoTagPlanRecordCountItem,列表) |
|
||||
| 标签-标签列表 | `POST /api/wx/friend/tag/list` | `botType`(int32, 必填,类型 1 个微 2企微);`page`(int64, 可选,分页page);`pageSize`(int64, 可选,分页pageSize);`name`(string, 可选,名字);`ids`(repeated int64, 可选,ids);`sort`(int64, 可选,0 默认 1 人数升序 2 人数降序);`isLatestNum`(bool, 可选,是否展示最新人数) | `list`(repeated TagGroupItem,分组标签列表);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool);`needLoadTagList`(bool,是否需要加载标签列表) |
|
||||
| 标签-根据标签组单独加载 | `POST /api/wx/friend/tag/list/byGroup` | `groupId`(int64, 必填,标签组id);`botType`(int32, 必填,类型 1 个微 2企微);`sort`(int64, 可选,0 默认 1 人数升序 2 人数降序);`isLatestNum`(bool, 可选,是否展示最新人数) | `tagList`(repeated TagItem,子标签) |
|
||||
| 标签-标签添加 | `POST /api/wx/friend/tag/add` | `botType`(int32, 必填,类型 1 个微 2企微);`name`(string, 必填,标签名字) | `id`(int64,id) |
|
||||
| 标签-标签删除 | `POST /api/wx/friend/tag/del` | `id`(int64, 必填,id);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 标签-标签批量删除 | `POST /api/wx/friend/tag/batchDel` | `ids`(repeated int64, 必填,ids);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 标签-标签更新 | `POST /api/wx/friend/tag/update` | `id`(int64, 必填,id);`name`(string, 必填,标签名字);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 标签-标签排序 | `POST /api/wx/friend/tag/updatePosition` | `groupId`(int64, 可选);`tagIds`(repeated int64, 可选);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 标签-标签导入 | `POST /api/wx/friend/tag/friendImport` | `targetTagId`(int64, 必填,导入的目标标签);`tagIds`(repeated int64, 必填,其他标签);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 标签-客户批量添加标签 | `POST /api/wx/friend/tag/friendAddTag` | `friendIdList`(repeated int64, 必填,客户id列表);`tagIdList`(repeated int64, 必填,标签id列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 标签-客户批量删除标签 | `POST /api/wx/friend/tag/friendDelTag` | `friendIdList`(repeated int64, 必填,客户id列表);`tagIdList`(repeated int64, 必填,标签id列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 标签-单个客户设置标签 | `POST /api/wx/friend/tag/friendSetTag` | `friendId`(int64, 必填,客户id);`tagIdList`(repeated int64, 必填,标签id列表);`original`(string, 可选,打标来源:客服系统 customer);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 标签-标签分组列表 | `POST /api/wx/friend/tag/group/list` | `botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated FriendTagGroupItem) |
|
||||
| 标签-创建标签分组 | `POST /api/wx/friend/tag/group/create` | `botType`(int32, 必填,类型 1 个微 2企微);`name`(string, 必填,分组名) | `id`(int64,id) |
|
||||
| 标签-标签分组信息更新 | `POST /api/wx/friend/tag/group/update` | `id`(int64, 必填,id);`name`(string, 必填,分组名称);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 标签-标签分组删除 | `POST /api/wx/friend/tag/group/del` | `id`(int64, 必填,id);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 标签-标签移进或者移出某个分组 | `POST /api/wx/friend/tag/setGroup` | `tagIds`(repeated int64, 必填,标签ids);`groupId`(int64, 必填,标签分组id);`isDelete`(bool, 可选,true就移出分组);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 标签-导入官方标签的客户 | `POST /api/wx/friend/tag/import/friend` | `ids`(repeated int64, 必填,ids);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 企微标签-同步 | `POST /api/wx/friend/tag/qwTag/sync` | `botId`(int64, 必填,机器人id);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 企业标签-列表 | `POST /api/wx/friend/tag/qwTag/list` | `corpId`(string, 必填,企业id);`botId`(int64, 可选,微号id);`botType`(int32, 必填,类型 1 个微 2企微) | `groupList`(repeated HttpQwTagListGroup,组列表) |
|
||||
| 企业标签-添加客户 | `POST /api/wx/friend/tag/qwTag/friendAdd` | `friendIdList`(repeated int64, 必填,客户id列表);`tagIds`(repeated string, 必填,标签数组);`botId`(int64, 必填,微号id);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 企业标签-删除客户 | `POST /api/wx/friend/tag/qwTag/friendDel` | `friendIdList`(repeated int64, 必填,客户id列表);`tagIds`(repeated string, 必填,标签数组);`botId`(int64, 必填,微号id);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 企业标签-同步标签下的所有联系人 | `POST /api/wx/friend/tag/qwTag/friendSync` | `id`(string, 必填,标签id);`botId`(int64, 必填,微号id);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
|
||||
|
||||
## 常用示例
|
||||
|
||||
```bash
|
||||
htsy-cli call /api/wx/friend/list -d '{"page":1,"pageSize":20,"botType":1,"botId":1001}'
|
||||
htsy-cli call /api/wx/friend/get -d '{"id":2002,"botType":1}'
|
||||
htsy-cli call /api/wx/friend/remark/set -d '{"id":2002,"remark":"重要客户","botType":1}'
|
||||
htsy-cli call /api/wx/friend/tag/list -d '{"page":1,"pageSize":50,"botType":1}'
|
||||
```
|
||||
@@ -0,0 +1,160 @@
|
||||
# 群、群成员与群运营
|
||||
|
||||
阅读本文件处理群列表、成员、群分组、群管理、群二维码、群成员操作、群公告、群欢迎语、群守卫、群查重、群转播、批量入群和批量邀请等操作。
|
||||
|
||||
## 目录
|
||||
|
||||
- [群基础与群管理](#群基础与群管理)
|
||||
- [群运营计划](#群运营计划)
|
||||
- [常用示例](#常用示例)
|
||||
|
||||
## 群基础与群管理
|
||||
|
||||
| 目标 | 接口 | 请求字段 | 常用返回字段 |
|
||||
| --- | --- | --- | --- |
|
||||
| 群列表 | `POST /api/wx/group/list` | `page`(int64, 可选,page);`pageSize`(int64, 可选,pagesize);`groupId`(int64, 可选,分组的id,不是群id,不要搞错了);`groupName`(string, 可选,群名字);`groupType`(string, 可选,群类型 wx 个微群 qw 企微外部群 qwIn 企微内部群);`botType`(int32, 必填,类型 1 个微 2企微);`botId`(int64, 可选,微号的id);`corpId`(string, 可选,企微主体id,没有传botId的情况,该字段必须传);`isManager`(bool, 可选,是否是管理员);`threePartyService`(string, 可选,三方服务过滤部分字段使用) | `list`(repeated HttpGroupInfoReply);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 某个群的成员列表 | `POST /api/wx/group/member/list` | `groupId`(int64, 可选);`botType`(int32, 必填,类型 1 个微 2企微);`corpId`(string, 必填,主体id);`name`(string, 可选,成员昵称) | `list`(repeated MemberInfo) |
|
||||
| 手动同步某个群的成员 | `POST /api/wx/group/member/sync` | `groupId`(int64, 必填,群id);`botId`(int64, 可选,如果有botid则为指定机器人同步);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 同步群列表 | `POST /api/wx/group/manualSync` | `botIds`(repeated int64, 必填,机器人id列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 同步群信息 | `POST /api/wx/group/syncGroupInfo` | `groupIds`(repeated int64, 必填,群id列表);`botType`(int32, 必填,类型 1 个微 2企微);`botId`(int64, 可选,微号id) | 空对象或无业务数据 |
|
||||
| 获取某个微号的微信群 | `POST /api/wx/group/list/byBot` | `botId`(int64, 必填,群id);`page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pagesize);`groupName`(string, 可选,群名字);`groupType`(string, 可选,群类型);`botType`(int32, 必填,类型 1 个微 2企微);`corpId`(string, 可选,主体id);`isManager`(bool, 可选,是否是管理员) | `list`(repeated HttpGroupInfoReply);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 群详情 | `POST /api/wx/group/info` | `groupId`(int64, 必填,群id);`botType`(int32, 必填,类型 1 个微 2企微) | `id`(int64,群id);`nickname`(string,群昵称);`avatar`(string,头像);`totalMember`(int64,成员数);`manager`(GroupManager,管理员);`categoryInfo`(CategoryItem,分组信息);`wxid`(string,群微信id);`groupType`(string,群类型 qw 企微群 wx个微群);`status`(int32,群状态 0正常 1 封禁);`corpIds`(repeated string,属于的主体) |
|
||||
| 根据群ids获取部分列表 | `POST /api/wx/group/list/byIds` | `ids`(repeated int64, 必填,群id列表);`groupName`(string, 可选,群名字);`groupType`(string, 可选,群类型);`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated HttpGroupInfoReply) |
|
||||
| 分组-添加 | `POST /api/wx/group/category/add` | `name`(string, 必填,分组的名字);`botType`(int32, 必填,类型 1 个微 2企微);`corpId`(string, 必填,主体id) | `id`(int64,id) |
|
||||
| 分组-列表 | `POST /api/wx/group/category/list` | `page`(int64, 可选,page);`pageSize`(int64, 可选,pageSize);`name`(string, 可选,分组名字);`ids`(repeated int64, 可选,分子ids);`botType`(int32, 必填,类型 1 个微 2企微);`corpId`(string, 必填,主体id) | `list`(repeated CategoryItem,分组列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 分组-删除 | `POST /api/wx/group/category/del` | `id`(int64, 必填,分组id);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 分组-更新 | `POST /api/wx/group/category/update` | `id`(int64, 必填,分组id);`name`(string, 必填,分组名字);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 分组-新增分组内的群 | `POST /api/wx/group/category/addGroup` | `id`(int64, 必填,分组id);`groupIds`(repeated int64, 必填,组内-群id列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 分组-减少分组内的群 | `POST /api/wx/group/category/delGroup` | `id`(int64, 必填,分组id);`groupIds`(repeated int64, 必填,组内-群id列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 分组-排序 | `POST /api/wx/group/category/sort` | `list`(repeated HttpCategorySortItem, 必填,列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 查询多群共同的机器人列表 | `POST /api/wx/group/commonBotList` | `groupIds`(repeated int64, 必填,群ids);`part`(bool, 必填,是否是部分共有的机器人,true 不用所有群都有,false 全部群都要有);`categoryIds`(repeated int64, 可选,群组ids);`botType`(int32, 必填,类型 1 个微 2企微);`isCreator`(bool, 可选,是否是创建者 true 是创建者, false 全部);`moduleName`(string, 可选,1 全功能 2 发单) | `list`(repeated CommonBotInfo,共同群列表);`groupTotal`(int64,群总数) |
|
||||
| 查询多群共同的客户列表 | `POST /api/wx/group/commonFriendList` | `groupIds`(repeated int64, 必填,群ids);`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated MemberInfo,共有的群成员列表) |
|
||||
| 设置群消息免打扰和折叠 | `POST /api/wx/group/setDisturbAndFold` | `ids`(repeated int64, 必填,群id列表);`disturb`(bool, 必填,是否打扰 false 打扰 true 免打扰);`fold`(bool, 必填,是否折叠 true 折叠 false 不折叠);`botType`(int32, 必填,类型 1 个微 2企微);`botId`(int64, 必填,botId) | 空对象或无业务数据 |
|
||||
| 群管理-创建群 | `POST /api/wx/group/manager/create` | `botType`(int32, 必填,类型 1 个微 2企微);`botId`(int64, 必填,机器人id);`name`(string, 必填,名字) | `id`(int64,群id);`nickname`(string,群昵称);`avatar`(string,头像);`totalMember`(int64,成员数);`manager`(GroupManager,管理员);`categoryInfo`(CategoryItem,分组信息);`wxid`(string,群微信id);`groupType`(string,群类型 qw 企微群 wx个微群);`status`(int32,群状态 0正常 1 封禁);`corpIds`(repeated string,属于的主体) |
|
||||
| 群管理-修改群名 | `POST /api/wx/group/manager/modifyName` | `botType`(int32, 必填,类型 1 个微 2企微);`groupId`(int64, 必填,群id);`botId`(int64, 必填,机器人id);`name`(string, 必填,名字);`atAll`(bool, 可选,是否@所有人) | 空对象或无业务数据 |
|
||||
| 群管理-修改群公告 | `POST /api/wx/group/manager/modifyNotice` | `botType`(int32, 必填,类型 1 个微 2企微);`groupId`(int64, 必填,群id);`botId`(int64, 必填,机器人id);`notice`(string, 必填,通知);`atAll`(bool, 可选,是否@所有人) | 空对象或无业务数据 |
|
||||
| 群管理-转让群主 | `POST /api/wx/group/manager/transferGroupOwner` | `botType`(int32, 必填,类型 1 个微 2企微);`groupId`(int64, 必填,群id);`botId`(int64, 必填,机器人id);`memberId`(int64, 必填,转让的目标成员id);`wxid`(string, 必填,转让对象的wxid) | 空对象或无业务数据 |
|
||||
| 群管理-批量转让群主 | `POST /api/wx/group/manager/batch/transferGroupOwner` | `groupIds`(repeated int64, 必填,群id);`botId`(int64, 可选,转让对象的微号id);`botType`(int32, 必填,类型 1 个微 2企微);`wxid`(string, 可选,转让对象的wxid);`managerBotId`(int64, 可选,群主的微号id) | `items`(repeated HttpBatchTransferGroupOwnerReplyItem,list) |
|
||||
| 群管理-解散群 | `POST /api/wx/group/manager/disbandGroup` | `botType`(int32, 必填,类型 1 个微 2企微);`groupId`(int64, 必填,群id);`botId`(int64, 必填,机器人id) | 空对象或无业务数据 |
|
||||
| 群管理-保存或移出通讯录 | `POST /api/wx/group/manager/saveOrDelAddressBook` | `botType`(int32, 必填,类型 1 个微 2企微);`groupId`(int64, 必填,群id);`botId`(int64, 必填,机器人id);`save`(bool, 必填,是否保存 true保存 false 移出) | 空对象或无业务数据 |
|
||||
| 群管理-批量修改群名 | `POST /api/wx/group/manager/batchModifyName` | `list`(repeated HttpModifyGroupName, 必填,群列表);`botId`(int64, 必填,机器人id);`atAll`(bool, 可选,是否@所有人);`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated HttpModifyGroupNameResult,结果) |
|
||||
| 群管理-修改微号本群昵称 | `POST /api/wx/group/modifyGroupBotNickname` | `botId`(int64, 必填,微号id);`groupId`(int64, 必填,群id);`nickname`(string, 必填,昵称);`botType`(int32, 必填,微号类型) | 空对象或无业务数据 |
|
||||
| 群成员-批量给一批群添加一批群成员 | `POST /api/wx/group/addMember` | `botId`(int64, 必填,机器人id);`groupIds`(repeated int64, 必填,群ids);`friendIds`(repeated int64, 必填,客户ids);`corpMemberIds`(repeated int64, 必填,主体成员id);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 群成员-批量给一批群移除一批群成员 | `POST /api/wx/group/delMember` | `botId`(int64, 必填,机器人id);`groupIds`(repeated int64, 必填,群ids);`friendIds`(repeated int64, 必填,客户ids);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 群成员-批量添加群管理员 | `POST /api/wx/group/addAdmin` | `botId`(int64, 必填,机器人id);`groupIds`(repeated int64, 必填,群ids);`friendIds`(repeated int64, 可选,客户ids);`memberIds`(repeated int64, 可选,群成员ids);`wxids`(repeated string, 可选,群成员ids);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 群成员-批量移除群管理员 | `POST /api/wx/group/delAdmin` | `botId`(int64, 必填,机器人id);`groupIds`(repeated int64, 必填,群ids);`friendIds`(repeated int64, 可选,客户ids);`memberIds`(repeated int64, 可选,群成员ids);`wxids`(repeated string, 可选,群成员ids);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 批量拉入黑名单 | `POST /api/wx/group/addBlack` | `botId`(int64, 必填,机器人id);`status`(int64, 必填,1:加入黑名单 0:移除黑名单);`friendIds`(repeated int64, 必填,客户ids);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 批量拉入黑名单(通过wxid操作) | `POST /api/wx/group/addBlack/bywxid` | `botWxid`(string, 必填,机器人wxid);`status`(int64, 必填,1:加入黑名单 0:移除黑名单);`friendWxids`(repeated string, 必填,客户wxids);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 获取群二维码 | `POST /api/wx/group/getCode` | `botId`(int64, 必填,机器人id);`groupId`(int64, 必填,群id);`botType`(int32, 必填,类型 1 个微 2企微) | `link`(string,链接) |
|
||||
| 退出群聊 | `POST /api/wx/group/exit` | `botId`(int64, 必填,机器人id);`groupId`(int64, 必填,群id);`botType`(int32, 必填,类型 1 个微 2企微) | `ok`(bool,是否成功 true成功);`failReason`(string,失败原因) |
|
||||
| 设置群头像 | `POST /api/wx/group/setAvatar` | `groupId`(int64, 必填,群id);`link`(string, 必填,头像地址);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 批量同步群 | `POST /api/wx/group/batch/sync` | `groupIds`(repeated int64, 必填,需要同步群的id列表) | 空对象或无业务数据 |
|
||||
| 通过wxid批量获取成员信息 | `POST /api/wx/group/list/ByWxid` | `wxids`(repeated string, 可选);`botType`(int32, 必填,微号类型) | `list`(repeated MemberInfo,群成员信息) |
|
||||
| 禁止修改群名 | `POST /api/wx/group/prohibit/groupName` | `list`(repeated ProhibitModifyGroupNameItem, 可选);`status`(bool, 必填,true 开启 false 关闭) | `list`(repeated HttpModifyGroupNameResult,结果) |
|
||||
| 开启/关闭禁止相互添加为联系人、禁止修改群名 | `POST /api/wx/group/modify/roomAdminFlag` | `list`(repeated ModifyRoomAdminFlagItem, 可选);`forbidAddContact`(bool, 必填,相互添加为联系人 true 开启 false 关闭);`forbidModName`(bool, 必填,修改群名 true 开启 false 关闭) | `list`(repeated HttpModifyRoomAdminFlagResult,结果) |
|
||||
| 群成员-通过memberIds获取群成员信息 | `POST /api/wx/group/member/byIds` | `memberIds`(repeated int64, 必填,群成员ids);`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated MemberInfo,群成员信息) |
|
||||
| 通过群Id和wxid获取成员id | `POST /api/wx/group/member/bywxid` | `groupId`(int64, 必填,群id);`wxid`(string, 必填,群ids) | `memberId`(int64) |
|
||||
| 置顶消息-设置置顶 | `POST /api/wx/group/topMsg/top` | `botId`(int64, 必填,微号id);`groupIds`(repeated int64, 必填,群ids);`messageList`(repeated Message, 必填,需要置顶的消息 暂时支持文本、图片、视频、链接、文件);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 置顶消息-移除置顶消息 | `POST /api/wx/group/topMsg/remove` | `botId`(int64, 可选,微号id 空 随机一个管理员);`groupId`(int64, 必填,群id);`topMsgId`(string, 必填,置顶消息id);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 置顶消息-消息列表 | `POST /api/wx/group/topMsg/list` | `groupId`(int64, 必填,群id);`botType`(int32, 必填,类型 1 个微 2企微) | `topMsgList`(repeated TopMsgItem,list);`total`(int64,总数) |
|
||||
| 开启或者关闭在群邀请验证状态 | `POST /api/wx/group/inviteStatus/modify` | `botId`(int64, 可选,微号id 空 随机一个管理员);`groupIds`(repeated int64, 必填,群ids);`status`(bool, 必填,true 开 false 关);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 置顶消息-同步置顶消息列表 | `POST /api/wx/group/topMsg/sync` | `botId`(int64, 必填,微号id);`groupId`(int64, 必填,群id);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 置顶消息-获取链接 | `POST /api/wx/group/topMsg/record/dl` | `id`(int64, 必填,置顶消息的id) | `link`(string,链接) |
|
||||
| 群成员-添加为好友 | `POST /api/wx/group/member/addContact` | `botId`(int64, 必填,微号id);`memberId`(repeated int64, 必填,群成员id);`content`(string, 必填,验证消息);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 获取群名称头像信息 | `POST /api/wx/group/baseInfo/byWxids` | `botType`(int32, 必填,微号类型);`wxids`(repeated string, 必填,wxids) | `list`(repeated GroupBaseInfo,群列表) |
|
||||
| 群列表(bywxids,主要api使用) | `POST /api/wx/group/list/byWxids` | `wxids`(repeated string, 必填,wxids) | `list`(repeated HttpFindListByWxidsItem,群列表) |
|
||||
|
||||
|
||||
## 群运营计划
|
||||
|
||||
| 目标 | 接口 | 请求字段 | 常用返回字段 |
|
||||
| --- | --- | --- | --- |
|
||||
| 批量入群-创建计划 | `POST /api/wx/group/batchAddGroup/create` | `botType`(int32, 必填,微号类型);`name`(string, 必填,计划名称);`groupCategoryId`(int64, 必填,群分组);`rolePlanId`(int64, 必填,角色方案);`bots`(repeated AddGroupBot, 必填,微号);`links`(repeated string, 必填,加群链接);`addGroupInterval`(int64, 必填,加群间隔 单位ms);`schedule`(Schedule, 必填,执行的时间段);`minMemberNum`(int64, 必填,最低成员数,小于该值不入群);`setFoldAndNotDisturb`(bool, 必填,设置折叠和免打扰) | `id`(int64,计划id) |
|
||||
| 批量入群-计划详情 | `POST /api/wx/group/batchAddGroup/info` | `id`(int64, 必填,计划id) | `id`(int64,计划id);`botType`(int32,微号类型);`name`(string,计划名称);`groupCategoryId`(int64,群分组);`rolePlanId`(int64,角色方案);`bots`(repeated AddGroupBotInfo,微号);`links`(repeated string,加群链接);`addGroupInterval`(int64,加群间隔 单位ms);`schedule`(Schedule,执行的时间段);`status`(string,状态);... |
|
||||
| 批量入群-计划列表 | `POST /api/wx/group/batchAddGroup/list` | `page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pagesize);`status`(string, 可选,状态) | `list`(repeated HttpBatchAddGroupPlanInfoReply,计划列表);`page`(int64,分页page);`pageSize`(int64,分页pagesize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 批量入群-更新计划 | `POST /api/wx/group/batchAddGroup/update` | `id`(int64, 必填,计划id);`name`(string, 必填,计划名称);`bots`(repeated AddGroupBot, 必填,微号);`addGroupInterval`(int64, 必填,加群间隔 单位ms);`schedule`(Schedule, 必填,执行的时间段);`minMemberNum`(int64, 必填,最低成员数,小于该值不入群);`setFoldAndNotDisturb`(bool, 必填,设置折叠和免打扰) | 空对象或无业务数据 |
|
||||
| 批量入群-删除计划 | `POST /api/wx/group/batchAddGroup/del` | `id`(int64, 必填,计划id) | 空对象或无业务数据 |
|
||||
| 批量入群-切换开关 | `POST /api/wx/group/batchAddGroup/toggle` | `id`(int64, 必填,计划id);`status`(string, 必填,状态: executing 开始执行, stop 暂停) | 空对象或无业务数据 |
|
||||
| 批量入群-记录 | `POST /api/wx/group/batchAddGroup/itemList` | `page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pagesize);`status`(string, 可选,状态);`pid`(int64, 必填,计划id);`botId`(int64, 必填,微号id) | `list`(repeated BatchAddGroupPlanItem,item列表);`page`(int64,分页page);`pageSize`(int64,分页pagesize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 批量群邀请-创建 | `POST /api/wx/group/batchInviteJoinPlan/create` | `name`(string, 必填,名字);`botType`(int32, 必填,微号类型);`filters`(repeated TargetFilter, 必填,客户的筛选类型);`useBlacklist`(bool, 必填,是否使用黑名单);`messageList`(repeated Message, 必填,回复内容);`botList`(repeated SenderBot, 必填,机器人ids);`targetRequireType`(string, 可选,specify 指定某些用户 filter 筛选);`targetIds`(repeated int64, 可选,指定成员Ids);`targetType`(string, 可选,推送对象 friend 客户 qwMember 企微成员);`intervalTime`(int64, 必填,拉托入群要用 时间间隔 单位s);`groupPlanId`(int64, 必填,派群计划(废弃));`schedule`(Schedule, 必填,推送的时间段);`isSupplement`(bool, 必填,是否补群);`corpId`(string, 可选,主体id);`inviteWithGroup`(bool, 必填,聚合邀请);`scene`(int64, 必填,场景 0:默认 1:40人拉群 2:40人补群 3:40人建群 10:企微成员补群);`fullTransferAdmin`(bool, 必填,接粉号群满转移群主给发单号);`fullAutoQuit`(bool, 必填,接粉号群满自动退群);`sendMsgBots`(repeated SendMsgBot, 必填,发单号);`disableMutexAssign`(bool, 可选,关闭互斥分配,客户会分配给每一个微号) | `id`(int64,id) |
|
||||
| 批量群邀请-暂停 | `POST /api/wx/group/batchInviteJoinPlan/stop` | `id`(int64, 可选) | 空对象或无业务数据 |
|
||||
| 批量群邀请-开始 | `POST /api/wx/group/batchInviteJoinPlan/start` | `id`(int64, 可选) | 空对象或无业务数据 |
|
||||
| 批量群邀请-更新 | `POST /api/wx/group/batchInviteJoinPlan/update` | `name`(string, 必填,名字);`botType`(int32, 必填,微号类型);`filters`(repeated TargetFilter, 必填,客户的筛选类型);`useBlacklist`(bool, 必填,是否使用黑名单);`messageList`(repeated Message, 必填,回复内容);`botList`(repeated SenderBot, 必填,机器人ids);`targetRequireType`(string, 可选,specify 指定某些用户 filter 筛选);`targetIds`(repeated int64, 可选,指定成员Ids);`targetType`(string, 可选,推送对象 friend 客户 qwMember 企微成员);`intervalTime`(int64, 必填,拉托入群要用 时间间隔 单位s);`groupPlanId`(int64, 必填,派群计划);`schedule`(Schedule, 必填,推送的时间段);`id`(int64, 必填,id);`isSupplement`(bool, 必填,是否补群);`corpId`(string, 可选,主体id);`inviteWithGroup`(bool, 必填,分配至同一群的一起拉);`scene`(int64, 必填,场景 0:默认 1:40人拉群 2:40人补群 3:40人建群 10:企微成员补群);`fullTransferAdmin`(bool, 必填,接粉号群满转移群主给发单号);`fullAutoQuit`(bool, 必填,接粉号群满自动退群);`sendMsgBots`(repeated SendMsgBot, 必填,发单号);... 另有 1 个字段 | 空对象或无业务数据 |
|
||||
| 批量群邀请-删除 | `POST /api/wx/group/batchInviteJoinPlan/del` | `id`(int64, 必填,id) | 空对象或无业务数据 |
|
||||
| 批量群邀请-列表 | `POST /api/wx/group/batchInviteJoinPlan/list` | `page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pagesize);`name`(string, 可选,名称搜索);`botType`(int32, 必填,微号类型) | `list`(repeated HttpGroupBatchJoinPlanDetailReply,方案列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 批量群邀请-详情 | `POST /api/wx/group/batchInviteJoinPlan/detail` | `id`(int64, 必填,id) | `name`(string,名字);`botType`(int32,微号类型);`filters`(repeated TargetFilter,客户的筛选类型);`useBlacklist`(bool,是否使用黑名单);`messageList`(repeated Message,回复内容);`botList`(repeated SenderBot,机器人ids);`targetRequireType`(string,specify 指定某些用户 filter 筛选 all 全部);`targetIds`(repeated int64,指定成员Ids);`targetType`(string,推送对象 friend 客户 qwMember 企微成员);`intervalTime`(int64,拉托入群要用 时间间隔 单位s);... |
|
||||
| 批量群邀请-推送记录列表 | `POST /api/wx/group/batchInviteJoinPlan/itemList` | `planId`(int64, 必填,计划id);`page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pagesize);`status`(string, 可选,状态);`botId`(int64, 可选,微号id) | `list`(repeated HttpGroupBatchPlanItem,方案列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 批量群邀请-预估人数 | `POST /api/wx/group/batchInviteJoinPlan/predictPeople` | `botType`(int32, 必填,微号类型);`filters`(repeated TargetFilter, 必填,客户的筛选类型);`botList`(repeated SenderBot, 必填,机器人ids);`useBlacklist`(bool, 可选,是否使用黑名单);`targetType`(string, 可选,推送对象 friend 客户 qwMember 企微成员);`targetRequireType`(string, 可选,specify 指定某些用户 filter 筛选 all 全部);`targetIds`(repeated int64, 可选,指定成员Ids) | `predictPeople`(int64,预估人数) |
|
||||
| 批量群邀请-失败计划的客户重发 | `POST /api/wx/group/batchInviteJoinPlan/copyFailPlan` | `planId`(int64, 必填,失败计划) | 空对象或无业务数据 |
|
||||
| 批量群邀请-固定成员进群记录 | `POST /api/wx/group/batchInviteJoinPlan/fixedRecord/list` | `planId`(int64, 必填,计划id);`page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pagesize);`status`(string, 可选,状态);`memberId`(int64, 可选,企微成员id);`inviterId`(int64, 可选,邀请人botId) | `list`(repeated FixedMemberRecord,记录);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 接受群邀请-受邀记录 | `POST /api/wx/group/inviteJoin/list` | `cfgId`(int64, 可选,方案id);`page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`botId`(int64, 可选,机器人id);`statusList`(repeated int64, 可选,状态筛选);`fromName`(string, 可选,邀请者名字);`botType`(int64, 可选,所属类型:1个微 2 企微) | `list`(repeated GroupInviteItem,组内群列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 接受群邀请-操作 | `POST /api/wx/group/inviteJoin/operate` | `id`(int64, 必填,邀请加入群聊的id);`agree`(bool, 必填,是否同意 true同意, false拒绝) | 空对象或无业务数据 |
|
||||
| 接受群邀请-获取方案配置 | `POST /api/wx/group/inviteJoin/conf` | `id`(int64, 可选) | `timeInterval`(int64,通过的时间间隔);`disturb`(bool,是否打扰 false 免打扰 true 打扰);`fold`(bool,是否折叠 true 折叠 false 不折叠);`auto`(bool,是否自动通过 true 自动 false 不自动);`joinGroupInvitePassCondition`(JoinGroupInviteCondition,通过条件);`id`(int64,id);`name`(string,方案名字);`botIds`(repeated int64,使用的机器人ids);`default`(bool,是否是默认方案);`botType`(int32,类型 1 个微 2企微);... |
|
||||
| 接受群邀请-获取方案配置列表 | `POST /api/wx/group/inviteJoin/conf/list` | `botType`(int32, 可选,微号类型);`botId`(int64, 可选,微号id) | `list`(repeated JoinGroupInviteConf,方案配置) |
|
||||
| 接受群邀请-修改方案配置 | `POST /api/wx/group/inviteJoin/conf/modify` | `timeInterval`(int64, 必填,通过的时间间隔);`disturb`(bool, 必填,是否打扰 false 免打扰 true 打扰);`fold`(bool, 必填,是否折叠 true 折叠 false 不折叠);`auto`(bool, 必填,是否自动通过 true 自动 false 不自动);`joinGroupInvitePassCondition`(JoinGroupInviteCondition, 必填,通过条件);`name`(string, 必填,方案名字);`botIds`(repeated int64, 必填,使用的机器人ids);`id`(int64, 必填,id);`botType`(int64, 必填,botType) | 空对象或无业务数据 |
|
||||
| 接受群邀请-创建方案配置 | `POST /api/wx/group/inviteJoin/conf/create` | `timeInterval`(int64, 必填,通过的时间间隔);`disturb`(bool, 必填,是否打扰 false 打扰 true 免打扰);`fold`(bool, 必填,是否折叠 true 折叠 false 不折叠);`auto`(bool, 必填,是否自动通过 true 自动 false 不自动);`joinGroupInvitePassCondition`(JoinGroupInviteCondition, 必填,通过条件);`name`(string, 必填,方案名字);`botIds`(repeated int64, 必填,使用的机器人ids) | `id`(int64,创建id) |
|
||||
| 接受群邀请-删除方案配置(默认的无法删除) | `POST /api/wx/group/inviteJoin/conf/del` | `id`(int64, 必填,方案id) | 空对象或无业务数据 |
|
||||
| 接受群邀请-手动排序 | `POST /api/wx/group/inviteJoin/conf/updatePosition` | `sourceId`(int64, 必填,移动方案id);`targetId`(int64, 必填,目标方案id) | 空对象或无业务数据 |
|
||||
| 群公告计划-列表 | `POST /api/wx/group/announcement/plan/list` | `page`(int64, 必填,page);`pageSize`(int64, 必填,分页pagesize);`userId`(int64, 可选,userid);`name`(string, 可选,名称搜索);`botType`(int32, 可选,类型 1 个微 2企微) | `list`(repeated GroupAnnouncementItem,list);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 群公告计划-创建 | `POST /api/wx/group/announcement/plan/create` | `id`(int64, 可选,id);`name`(string, 必填,计划昵称);`bots`(Bots, 可选,微号);`groupAnnouncementContent`(string, 必填,群公告内容);`type`(string, 必填,计划类型 common 普通计划);`messageList`(repeated Message, 可选,发布公告后发送的消息);`schedule`(Schedule, 必填,推送时间设置);`scheduleType`(string, 可选,推送类型 立即quick 延迟delay 每天 everyday 每周 week);`isAtAll`(bool, 可选,是否@所有人);`groupIds`(repeated int64, 必填,群ids);`targetRequireType`(string, 必填,推送筛选 all 所有 specify 指定某些群);`botRequireType`(string, 必填,微号范围 admin 管理员或者群主 specify 指定管理员);`botType`(int32, 可选,类型 1 个微 2企微) | `id`(int64,id) |
|
||||
| 群公告计划-更新 | `POST /api/wx/group/announcement/plan/update` | `id`(int64, 可选,id);`name`(string, 必填,计划昵称);`bots`(Bots, 可选,微号);`groupAnnouncementContent`(string, 必填,群公告内容);`type`(string, 必填,计划类型 common 普通计划);`messageList`(repeated Message, 可选,发布公告后发送的消息);`schedule`(Schedule, 必填,推送时间设置);`scheduleType`(string, 可选,推送类型 立即quick 延迟delay 每天 everyday 每周 week);`isAtAll`(bool, 可选,是否@所有人);`groupIds`(repeated int64, 必填,群ids);`targetRequireType`(string, 必填,推送筛选 all 所有 specify 指定某些群);`botRequireType`(string, 必填,微号范围 admin 管理员或者群主 specify 指定管理员);`botType`(int32, 可选,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 群公告计划-详情 | `POST /api/wx/group/announcement/plan/info` | `id`(int64, 必填,id) | `id`(int64,id);`name`(string,计划昵称);`bots`(Bots,微号);`groupAnnouncementContent`(string,群公告内容);`type`(string,计划类型 common 普通计划);`messageList`(repeated Message,发布公告后发送的消息);`schedule`(Schedule,推送时间设置);`scheduleType`(string,推送类型 立即quick 延迟delay 每天 everyday 每周 week);`isAtAll`(bool,是否@所有人);`groupIds`(repeated int64,群ids);... |
|
||||
| 计划暂停 | `POST /api/wx/group/announcement/plan/stop` | `id`(int64, 必填,要取消的id);`idType`(int32, 必填,id的类型,1 计划id 2 record id 3 客户群id 4 消息记录id 5 消息id);`recordId`(int64, 可选,记录id, 开始和暂停可以不传) | 空对象或无业务数据 |
|
||||
| 计划开始 | `POST /api/wx/group/announcement/plan/start` | `id`(int64, 必填,要取消的id);`idType`(int32, 必填,id的类型,1 计划id 2 record id 3 客户群id 4 消息记录id 5 消息id);`recordId`(int64, 可选,记录id, 开始和暂停可以不传) | 空对象或无业务数据 |
|
||||
| 群公告计划-删除 | `POST /api/wx/group/announcement/plan/del` | `id`(int64, 必填,id) | 空对象或无业务数据 |
|
||||
| 群公告计划-方案记录列表 | `POST /api/wx/group/announcement/plan/record/list` | `pid`(int64, 必填,方案id) | `list`(repeated GroupAnnouncementPlanRecordItem) |
|
||||
| 群公告计划-方案记录 | `POST /api/wx/group/announcement/plan/record/item/list` | `pid`(int64, 必填,方案id);`recordId`(int64, 必填,方案记录id);`page`(int64, 必填,page);`pageSize`(int64, 必填,分页pagesize);`status`(string, 必填,状态);`botWxid`(string, 必填,机器人wxid);`groupWxid`(string, 必填,群wxid) | `list`(repeated HttpGroupAnnouncementPlanRecordItemListItem,list);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 群查重-计划创建 | `POST /api/wx/group/duplicate/plan/create` | `id`(int64, 可选,id);`name`(string, 必填,计划昵称);`groupIds`(repeated int64, 必填,群ids);`friendIds`(repeated int64, 可选,不参与查重的客户);`isAddBlacklist`(bool, 可选,是否拉黑);`isKickingMember`(bool, 可选,是否踢人);`kickInterval`(int64, 可选,踢人间隔 单位秒);`botId`(int64, 可选,踢人拉黑的执行微号);`Schedule`(Schedule, 可选,定时);`scheduleType`(string, 必填,delay quick);`targetType`(string, 必填,groupMember 群成员 bot 微号 inGroupSystemBot 在群微号查重);`specifyWxids`(repeated string, 可选,指定查重的对象);`botType`(int32, 必填,类型 1 个微 2企微) | `id`(int64,id);`name`(string,计划昵称);`groupIds`(repeated int64,群ids);`friendIds`(repeated int64,不参与查重的客户);`isAddBlacklist`(bool,是否拉黑);`isKickingMember`(bool,是否踢人);`kickInterval`(int64,踢人间隔);`botId`(int64,踢人拉黑的执行微号);`Schedule`(Schedule,定时);`scheduleType`(string,delay quick);... |
|
||||
| 群查重-计划列表 | `POST /api/wx/group/duplicate/plan/list` | `name`(string, 可选,名字);`page`(int64, 可选,page);`pageSize`(int64, 可选,pageSize);`id`(string, 可选,从指定的id开始获取offset条计划,为空从头开始);`offset`(string, 可选,分页大小,id offset都为空则查全部);`botType`(int32, 可选,类型 1 个微 2企微) | `list`(repeated DuplicatePlanInfo,列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last);`nextId`(string,查询下一页时的起始id) |
|
||||
| 群查重-计划更新 | `POST /api/wx/group/duplicate/plan/update` | `id`(int64, 可选,id);`name`(string, 必填,计划昵称);`groupIds`(repeated int64, 必填,群ids);`friendIds`(repeated int64, 可选,不参与查重的客户);`isAddBlacklist`(bool, 可选,是否拉黑);`isKickingMember`(bool, 可选,是否踢人);`kickInterval`(int64, 可选,踢人间隔 单位秒);`botId`(int64, 可选,踢人拉黑的执行微号);`Schedule`(Schedule, 可选,定时);`scheduleType`(string, 必填,delay quick);`targetType`(string, 必填,groupMember 群成员 bot 微号 inGroupSystemBot 在群微号查重);`specifyWxids`(repeated string, 可选,指定查重的对象);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 群查重-计划删除 | `POST /api/wx/group/duplicate/plan/del` | `id`(int64, 可选,id) | 空对象或无业务数据 |
|
||||
| 群查重-计划详情 | `POST /api/wx/group/duplicate/plan/info` | `id`(int64, 可选,id) | `id`(int64,id);`name`(string,计划昵称);`groupIds`(repeated int64,群ids);`friendIds`(repeated int64,不参与查重的客户);`isAddBlacklist`(bool,是否拉黑);`isKickingMember`(bool,是否踢人);`kickInterval`(int64,踢人间隔);`botId`(int64,踢人拉黑的执行微号);`Schedule`(Schedule,定时);`scheduleType`(string,delay quick);... |
|
||||
| 群查重-计划记录 | `POST /api/wx/group/duplicate/plan/record` | `pid`(int64, 可选,id);`page`(int64, 可选,page);`pageSize`(int64, 可选,pageSize) | `list`(repeated DuplicatePlanRecordItem);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last);`status`(string,状态);`failReason`(string,失败原因);`listByGroup`(repeated DuplicatePlanRecordItemByGroup,targetType:inGroupSystemBot 有值);`targetType`(string,groupMember 群成员 bot 微号 inGroupSystemBot 在群微号查重) |
|
||||
| 群查重-踢人或者拉黑 | `POST /api/wx/group/duplicate/plan/record/kickOrBlacklist` | `recordId`(repeated int64, 必填,记录id);`type`(string, 必填,kick 踢 blacklist 拉黑);`botId`(int64, 必填,指定微号,不然就到各各群里拿管理员,拉黑只会拿一个);`isKeepOn`(bool, 可选,踢出时是否保留一个群不踢) | 空对象或无业务数据 |
|
||||
| 群查重-退出或者踢出单个群 | `POST /api/wx/group/duplicate/plan/record/kickOrQuit` | `recordItemId`(repeated int64, 必填,记录id);`type`(string, 必填,kick 踢 quit 退出);`botId`(int64, 必填,指定微号,不然就到各各群里拿管理员) | 空对象或无业务数据 |
|
||||
| 入群欢迎语-添加 | `POST /api/wx/group/welcome/add` | `id`(int64, 可选,id);`name`(string, 必填,名称);`botType`(int64, 必填,1个微 2企微);`botIds`(repeated int64, 必填,应用微号);`groupIds`(repeated int64, 必填,应用客户群);`ruleList`(repeated Rule, 可选,触发规则);`replyList`(repeated Message, 必填,回复内容);`replyMode`(string, 必填,回复模式 fixed 固定 random 随机);`newReplyList`(repeated ReplyItem, 必填,新的回复内容结构) | `id`(int64,id) |
|
||||
| 入群欢迎语-列表 | `POST /api/wx/group/welcome/list` | `page`(int64, 必填,page);`pageSize`(int64, 必填,分页pagesize);`userId`(int64, 可选,userid);`name`(string, 可选,名称搜索);`botType`(int32, 可选,类型 1 个微 2企微) | `list`(repeated GroupWelcomeItem,方案列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 入群欢迎语-详情 | `POST /api/wx/group/welcome/info` | `id`(int64, 必填,id) | `id`(int64,id);`name`(string,名称);`botType`(int64,1个微 2企微);`botIds`(repeated int64,应用微号);`groupIds`(repeated int64,应用客户群);`ruleList`(repeated Rule,触发规则);`replyList`(repeated Message,回复内容);`replyMode`(string,回复模式 fixed 固定 random 随机);`newReplyList`(repeated ReplyItem,新的回复内容结构) |
|
||||
| 入群欢迎语-更新 | `POST /api/wx/group/welcome/update` | `id`(int64, 可选,id);`name`(string, 必填,名称);`botType`(int64, 必填,1个微 2企微);`botIds`(repeated int64, 必填,应用微号);`groupIds`(repeated int64, 必填,应用客户群);`ruleList`(repeated Rule, 可选,触发规则);`replyList`(repeated Message, 必填,回复内容);`replyMode`(string, 必填,回复模式 fixed 固定 random 随机);`newReplyList`(repeated ReplyItem, 必填,新的回复内容结构) | 空对象或无业务数据 |
|
||||
| 入群欢迎语-删除 | `POST /api/wx/group/welcome/del` | `id`(int64, 必填,id) | 空对象或无业务数据 |
|
||||
| 群守卫-添加 | `POST /api/wx/group/guard/plan/add` | `botType`(int32, 必填,类型 1 个微 2企微);`name`(string, 必填,名称);`botId`(int64, 必填,应用微号:单个);`groupIds`(repeated int64, 必填,应用客户群:多个);`timeFrame`(TimeFrame, 必填,生效时间段);`rule`(GuardRule, 必填,触发规则);`action`(GuardAction, 必填,动作);`status`(repeated string, 必填,规则状态);`applyGroup`(string, 必填,应用群范围, all / specify);`execBotId`(int64, 可选,执行微号(个微计划)) | `id`(int64) |
|
||||
| 群守卫-修改 | `POST /api/wx/group/guard/plan/update` | `botType`(int32, 必填,类型 1 个微 2企微);`id`(int64, 必填,id);`name`(string, 必填,名称);`botId`(int64, 必填,应用微号:单个);`groupIds`(repeated int64, 必填,应用客户群:多个);`timeFrame`(TimeFrame, 必填,生效时间段);`rule`(GuardRule, 必填,触发规则);`action`(GuardAction, 必填,动作);`status`(repeated string, 必填,规则状态);`applyGroup`(string, 必填,应用群范围, all / specify);`execBotId`(int64, 可选,执行动作的微号) | 空对象或无业务数据 |
|
||||
| 群守卫-删除 | `POST /api/wx/group/guard/plan/del` | `id`(int64, 必填,id) | 空对象或无业务数据 |
|
||||
| 群守卫-列表 | `POST /api/wx/group/guard/plan/list` | `page`(int64, 可选,page);`pageSize`(int64, 可选,pagesize) | `list`(repeated HttpGroupGuardInfoReply,群守卫列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 群守卫-详情 | `POST /api/wx/group/guard/plan/info` | `id`(int64, 必填,群守卫计划id) | `botType`(int32,类型 1 个微 2企微);`id`(int64,id);`name`(string,名称);`botId`(int64,应用微号:单个);`groupIds`(repeated int64,应用客户群:多个);`timeFrame`(TimeFrame,生效时间段);`rule`(GuardRule,触发规则);`action`(GuardAction,动作);`status`(repeated string,规则状态);`applyGroup`(string,应用群范围, all / specify);... |
|
||||
| 群守卫-白名单更新 | `POST /api/wx/group/guard/whitelist/update` | `isSystem`(bool, 必填,系统内微号自动加入白名单);`whitelist`(repeated int64, 必填,手动设置的白名单客户);`link`(repeated string, 必填,链接白名单);`miniProgram`(repeated WhitelistItem, 必填,小程序白名单);`freeVideo`(repeated string, 必填,视频号白名单);`corpIds`(repeated string, 必填,过滤企微主体);`globalWhitelist`(bool, 可选,全局白名单开关);`corpType`(string, 可选,主体过滤类型);`wxBatchWhite`(repeated string, 可选,个微计划批量导入白名单);`qwBatchWhite`(repeated string, 可选,企微计划批量导入白名单) | 空对象或无业务数据 |
|
||||
| 群守卫-白名单信息 | `POST /api/wx/group/guard/whitelist/info` | `{}` | `isSystem`(bool,系统内微号自动加入白名单);`whitelist`(repeated int64,手动设置的白名单客户);`link`(repeated string,链接白名单);`miniProgram`(repeated WhitelistItem,小程序白名单);`freeVideo`(repeated string,视频号白名单);`corpIds`(repeated string,过滤企微主体);`globalWhitelist`(bool,全局白名单开关);`corpType`(string,主体过滤类型);`wxBatchWhite`(repeated string,个微计划批量导入白名单);`qwBatchWhite`(repeated string,企微计划批量导入白名单) |
|
||||
| 群守卫-执行记录 | `POST /api/wx/group/guard/record/list` | `page`(int64, 可选,page);`pageSize`(int64, 可选,pagesize);`guardId`(int64, 可选,群守卫计划id);`action`(string, 可选,执行的动作) | `list`(repeated GroupGuardRecordItem,群守卫执行记录列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 退群监听-列表 | `POST /api/wx/group/quit/plan/list` | `page`(int64, 可选,page);`pageSize`(int64, 可选,pagesize) | `list`(repeated ListItem,群守卫列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 退群监听-创建 | `POST /api/wx/group/quit/plan/create` | `name`(string, 必填,方案名称);`botId`(int64, 必填,机器人id);`botType`(int32, 必填,机器人类型);`groupIds`(repeated int64, 必填,群id列表);`targetGroupId`(int64, 必填,目标群id);`status`(bool, 必填,状态 默认 关闭 false, true是开);`guideMessageList`(repeated Message, 必填,引导语);`maxInviteCount`(int32, 必填,最大拉入次数,0表示不限制) | `id`(int64,id) |
|
||||
| 退群监听-更新 | `POST /api/wx/group/quit/plan/update` | `id`(int64, 必填,id);`name`(string, 必填,方案名称);`botId`(int64, 必填,机器人id);`botType`(int32, 必填,机器人类型);`groupIds`(repeated int64, 必填,群id列表);`targetGroupId`(int64, 必填,目标群id);`status`(bool, 必填,状态 默认 关闭 false, true是开);`guideMessageList`(repeated Message, 必填,引导语);`maxInviteCount`(int32, 必填,最大拉入次数,0表示不限制) | 空对象或无业务数据 |
|
||||
| 退群监听-删除 | `POST /api/wx/group/quit/plan/delete` | `id`(int64, 必填,id) | 空对象或无业务数据 |
|
||||
| 退群监听-详情 | `POST /api/wx/group/quit/plan/info` | `id`(int64, 必填,id) | `id`(int64,id);`name`(string,名称);`botId`(int64,机器人id);`botType`(int32,机器人类型);`groupIds`(repeated int64,群id列表);`targetGroupId`(int64,目标群id);`status`(bool,状态 默认 关闭 false, true是开);`guideMessageList`(repeated Message,引导语);`maxInviteCount`(int32,最大拉入次数,0表示不限制) |
|
||||
| 退群监听-更新状态 | `POST /api/wx/group/quit/plan/update/status` | `id`(int64, 必填,id);`status`(bool, 必填,状态 默认 关闭 false, true是开) | 空对象或无业务数据 |
|
||||
| 退群监听-记录 | `POST /api/wx/group/quit/plan/records` | `page`(int64, 可选,page);`pageSize`(int64, 可选,pagesize);`pid`(int64, 必填,计划id) | `list`(repeated RecordItem,记录);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 群转播-添加 | `POST /api/wx/group/relay/add` | `botType`(int32, 必填,类型 1 个微 2企微);`sources`(repeated Source, 必填,转发的来源);`relayTypes`(repeated string, 必填,要转发的消息类型);`targetType`(string, 必填,对象类型:normal,role,qwMember);`targetGroupIds`(repeated int64, 必填,转发的目标群);`targetQwMemberIds`(repeated int64, 必填,转发的目标企微成员);`targetQwMemberCorpId`(string, 必填,企微corpId);`rolePlanId`(int64, 必填,角色方案);`relayExecutorIds`(repeated int64, 必填,转发的人);`name`(string, 必填,计划名称);`filterContent`(repeated string, 必填,过滤内容);`replaceList`(repeated Replace, 必填,替换内容);`autoImageToSticker`(bool, 必填,图片发送超限转成表情发送);`status`(bool, 必填,开关状态);`imageToStickerEnable`(bool, 必填,主动图片转表情发送);`LinkConvConf`(repeated LinkConvConf, 必填,转链配置);`timeFrame`(repeated int64, 必填,生效时间段);`linkConvFailSkip`(bool, 必填,转链失败就跳过转链直接发);`textLinkWhitelist`(repeated string, 必填,文本链接白名单);`textLinkConvSkipList`(repeated string, 必填,跳过转链的文本链接名单);... 另有 3 个字段 | `id`(int64,id) |
|
||||
| 群转播-修改 | `POST /api/wx/group/relay/update` | `id`(int64, 必填,id);`botType`(int32, 必填,类型 1 个微 2企微);`sources`(repeated Source, 必填,转发的来源);`relayTypes`(repeated string, 必填,要转发的消息类型);`targetType`(string, 必填,对象类型:normal,role,qwMember);`targetGroupIds`(repeated int64, 必填,转发的目标群);`targetQwMemberIds`(repeated int64, 必填,转发的目标企微成员);`targetQwMemberCorpId`(string, 必填,企微corpId);`rolePlanId`(int64, 必填,角色方案);`relayExecutorIds`(repeated int64, 必填,转发的人);`name`(string, 必填,计划名称);`filterContent`(repeated string, 必填,过滤内容);`replaceList`(repeated Replace, 必填,替换内容);`autoImageToSticker`(bool, 必填,图片发送超限转成表情发送);`status`(bool, 必填,开关状态);`imageToStickerEnable`(bool, 必填,主动图片转表情发送);`LinkConvConf`(repeated LinkConvConf, 必填,转链配置);`timeFrame`(repeated int64, 必填,生效时间段);`linkConvFailSkip`(bool, 必填,转链失败就跳过转链直接发);`textLinkWhitelist`(repeated string, 必填,文本链接白名单);... 另有 4 个字段 | 空对象或无业务数据 |
|
||||
| 群转播-列表 | `POST /api/wx/group/relay/list` | `page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`userId`(int64, 可选,筛选计划的创建者);`name`(string, 必填,搜索计划名字) | `list`(repeated HttpInfoReply,列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 群转播-详情 | `POST /api/wx/group/relay/info` | `id`(int64, 必填,id) | `id`(int64,id);`botType`(int32,类型 1 个微 2企微);`sources`(repeated Source,转发的来源);`relayTypes`(repeated string,要转发的消息类型);`targetType`(string,对象类型:normal,role,qwMember);`targetGroupIds`(repeated int64,转发的目标群);`targetQwMemberIds`(repeated int64,转发的目标企微成员);`targetQwMemberCorpId`(string,企微corpId);`rolePlanId`(int64,角色方案);`relayExecutorIds`(repeated int64,转发的人);... |
|
||||
| 群转播-删除 | `POST /api/wx/group/relay/del` | `id`(int64, 必填,id) | 空对象或无业务数据 |
|
||||
| 群转播-记录 | `POST /api/wx/group/relay/record/list` | `page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`pid`(int64, 必填,转播计划id);`groupId`(int64, 可选,主讲群id);`status`(string, 可选,状态筛选);`botId`(int64, 可选,发送微号筛选) | `list`(repeated RecordItem,记录列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 群转播-手动重发 | `POST /api/wx/group/relay/resend` | `id`(int64, 必填,recordId 或者 targetId);`idType`(int64, 必填,重发类型,1:重发record的所有群,2:重发target指定的群) | 空对象或无业务数据 |
|
||||
| 记录的cdn内容下载 | `POST /api/wx/group/relay/record/cdn_dl` | `recordId`(int64, 可选) | `link`(string) |
|
||||
| 群转播-数据源-添加 | `POST /api/wx/group/relay/source/add` | `botType`(int32, 必填,类型 1 个微 2企微);`groupId`(int64, 必填,主讲群id);`listenBotId`(int64, 必填,消息监听botId);`speakerIds`(repeated int64, 必填,主讲人ids);`shareAccount`(repeated int64, 必填,自定义分享范围);`sourceInfo`(SourceInfo, 必填,数据源详情);`name`(string, 必填,名称);`type`(string, 必填,数据源类型 group:群 meituan:美团 webhook:自定义数据源 dataoke:大淘客) | 空对象或无业务数据 |
|
||||
| 群转播-数据源-修改 | `POST /api/wx/group/relay/source/update` | `id`(int64, 必填,id);`botType`(int32, 必填,类型 1 个微 2企微);`groupId`(int64, 必填,主讲群id);`listenBotId`(int64, 必填,消息监听botId);`speakerIds`(repeated int64, 必填,主讲人ids);`shareAccount`(repeated int64, 必填,自定义分享范围);`sourceInfo`(SourceInfo, 必填,数据源详情);`name`(string, 必填,名称);`type`(string, 必填,数据源类型 group:群 meituan:美团 webhook:自定义数据源 dataoke:大淘客) | 空对象或无业务数据 |
|
||||
| 群转播-数据源-列表 | `POST /api/wx/group/relay/source/list` | `page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`ids`(repeated int64, 可选,数据源ids);`botType`(int32, 必填,类型 1 个微 2企微);`category`(string, 必填,数据源类别 self:自己的 official:官方 share:分享的);`type`(string, 必填,数据源类型 group:群 meituan:美团 webhook:自定义数据源 dataoke:大淘客) | `list`(repeated HttpSourceInfoReply,列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 群转播-数据源-详情 | `POST /api/wx/group/relay/source/info` | `id`(int64, 必填,id) | `id`(int64,id);`botType`(int32,类型 1 个微 2企微);`groupId`(int64,主讲群id);`listenBotId`(int64,消息监听botId);`speakerIds`(repeated int64,主讲人ids);`shareAccount`(repeated int64,自定义分享范围);`sourceInfo`(SourceInfo,数据源详情);`name`(string,数据源名称);`avatar`(string,群头像);`type`(string,数据源类型 group:群 meituan:美团 webhook:自定义数据源 dataoke:大淘客);... |
|
||||
| 群转播-数据源-删除 | `POST /api/wx/group/relay/source/del` | `id`(int64, 必填,id) | 空对象或无业务数据 |
|
||||
| 群转播-记录-转播目标 | `POST /api/wx/group/relay/record/targets` | `page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`pid`(int64, 必填,转播计划id);`status`(string, 可选,状态筛选);`recordId`(int64, 必填,转播记录id);`botId`(int64, 可选,bot筛选);`targetIds`(repeated int64, 可选,ids筛选) | `list`(repeated Target,转播目标列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 群转播-记录-撤回 | `POST /api/wx/group/relay/record/retract` | `type`(int64, 必填,撤回类型,1:撤回record下所有的,2:撤回指定target);`recordId`(int64, 必填,recordId);`targetId`(int64, 可选,targetId) | 空对象或无业务数据 |
|
||||
| 群转播-手动排序 | `POST /api/wx/group/relay/updatePosition` | `sourceId`(int64, 必填,移动方案id);`targetId`(int64, 必填,目标方案id) | 空对象或无业务数据 |
|
||||
|
||||
|
||||
## 常用示例
|
||||
|
||||
```bash
|
||||
htsy-cli call /api/wx/group/list -d '{"page":1,"pageSize":20,"botType":1,"botId":1001}'
|
||||
htsy-cli call /api/wx/group/member/list -d '{"page":1,"pageSize":50,"groupId":3001,"botType":1}'
|
||||
htsy-cli call /api/wx/group/getCode -d '{"groupId":3001,"botType":1}'
|
||||
htsy-cli call /api/wx/group/category/add -d '{"name":"活动群","botType":1}'
|
||||
```
|
||||
@@ -0,0 +1,38 @@
|
||||
# 素材与话术库
|
||||
|
||||
阅读本文件处理素材列表、素材增删改查、获取 OSS 上传 token、话术库、话术分类、话术标签等操作。素材内容里的消息结构见 [api-common.md](api-common.md)。
|
||||
|
||||
## 素材与话术接口
|
||||
|
||||
| 目标 | 接口 | 请求字段 | 常用返回字段 |
|
||||
| --- | --- | --- | --- |
|
||||
| 素材上传 | `POST /api/material/upload` | `type`(string, 必填,素材类型);`material`(bytes, 必填,素材) | `link`(string,素材地址) |
|
||||
| 列表 | `POST /api/material/list` | `page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`name`(string, 可选,素材名字搜索);`type`(string, 必填,类型);`isQy`(bool, 可选,是否属于企业) | `list`(repeated MaterialInfo,计划列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 添加 | `POST /api/material/add` | `id`(int64, 可选,素材id);`type`(string, 必填,素材类型);`name`(string, 必填,素材名字);`text`(MessageText, 可选,文本消息 text);`image`(MessageImage, 可选,图片消息 image);`sticker`(MessageSticker, 可选,表情消息 sticker);`video`(MessageVideo, 可选,视频消息 video);`miniProgram`(MessageMiniProgram, 可选,小程序 miniProgram);`link`(MessageLink, 可选,链接 link);`audio`(MessageAudio, 可选,音频 audio);`compositeImage`(MessageCompositeImage, 可选,合成图 compositeImage);`inviteGroup`(MessageInviteGroup, 可选,入群邀请 inviteGroup);`goods`(MessageGoods, 可选,商品 goods);`freeVideo`(MessageFreeVideo, 可选,视频号 freeVideo);`liveBroadcastRoom`(MessageLiveBroadcastRoom, 可选,直播间 liveBroadcastRoom);`file`(MessageFile, 可选,文件 file);`note`(MessageNote, 可选,笔记 note);`collection`(repeated Collection, 可选,合集 collection);`materialGroup`(repeated MaterialDialogueContent, 可选,素材组List);`isQy`(bool, 可选,是否属于企业);... 另有 1 个字段 | `id`(int64) |
|
||||
| 删除 | `POST /api/material/del` | `ids`(repeated int64, 必填,删除的ids);`type`(string, 必填,素材类型) | 空对象或无业务数据 |
|
||||
| 更新 | `POST /api/material/update` | `id`(int64, 可选,素材id);`type`(string, 必填,素材类型);`name`(string, 必填,素材名字);`text`(MessageText, 可选,文本消息 text);`image`(MessageImage, 可选,图片消息 image);`sticker`(MessageSticker, 可选,表情消息 sticker);`video`(MessageVideo, 可选,视频消息 video);`miniProgram`(MessageMiniProgram, 可选,小程序 miniProgram);`link`(MessageLink, 可选,链接 link);`audio`(MessageAudio, 可选,音频 audio);`compositeImage`(MessageCompositeImage, 可选,合成图 compositeImage);`inviteGroup`(MessageInviteGroup, 可选,入群邀请 inviteGroup);`goods`(MessageGoods, 可选,商品 goods);`freeVideo`(MessageFreeVideo, 可选,视频号 freeVideo);`liveBroadcastRoom`(MessageLiveBroadcastRoom, 可选,直播间 liveBroadcastRoom);`file`(MessageFile, 可选,文件 file);`note`(MessageNote, 可选,笔记 note);`collection`(repeated Collection, 可选,合集 collection);`materialGroup`(repeated MaterialDialogueContent, 可选,素材组List);`isQy`(bool, 可选,是否属于企业);... 另有 1 个字段 | 空对象或无业务数据 |
|
||||
| 获取发送给机器人自己的素材 | `POST /api/material/get/byBotOwn` | `botId`(int64, 必填,机器人id);`msgType`(string, 必填,msgType);`botType`(int32, 必填,类型 1 个微 2企微);`friendId`(int64, 必填,客户id) | `msgType`(string,消息类型);`role`(string,角色名);`delayTime`(int64,延迟时间 单位ms如 1000ms);`delayType`(string,延迟时间单位 s 秒 m 分 h 小时);`text`(MessageText,文本消息 text);`image`(MessageImage,图片消息 image);`sticker`(MessageSticker,表情消息 sticker);`video`(MessageVideo,视频消息 video);`miniProgram`(MessageMiniProgram,小程序 miniProgram);`link`(MessageLink,链接 link);... |
|
||||
| 获取单个素材信息 | `POST /api/material/info` | `id`(int64, 必填,id);`msgType`(string, 必填,msgType) | `id`(int64,素材id);`type`(string,素材类型);`name`(string,素材名字);`text`(MessageText,文本消息 text);`image`(MessageImage,图片消息 image);`sticker`(MessageSticker,表情消息 sticker);`video`(MessageVideo,视频消息 video);`miniProgram`(MessageMiniProgram,小程序 miniProgram);`link`(MessageLink,链接 link);`audio`(MessageAudio,音频 audio);... |
|
||||
| 话术库创建 | `POST /api/material/dialogue/add` | `name`(string, 必填,素材名字);`content`(repeated MaterialDialogueContent, 可选,素材内容);`categoryId`(int64, 可选,分类id);`isQy`(bool, 可选,是否属于企业) | `id`(int64,id) |
|
||||
| 话术库列表 | `POST /api/material/dialogue/list` | `page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`name`(string, 可选,素材名字搜索);`categoryId`(int64, 可选,按分类搜索);`tagIds`(repeated int64, 可选,按标签搜索);`isQy`(bool, 可选,是否属于企业) | `list`(repeated MaterialDialogueListItem,话术库列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 话术库删除 | `POST /api/material/dialogue/del` | `id`(int64, 可选,id) | 空对象或无业务数据 |
|
||||
| 话术库更新 | `POST /api/material/dialogue/update` | `id`(int64, 可选,id);`name`(string, 必填,素材名字);`content`(repeated MaterialDialogueContent, 可选,素材内容);`categoryId`(int64, 可选,分类id);`isQy`(bool, 可选,是否属于企业) | 空对象或无业务数据 |
|
||||
| 话术库分类创建 | `POST /api/material/dialogue/category/add` | `name`(string, 可选,类别名);`isQy`(bool, 可选,是否属于企业) | `id`(int64,id) |
|
||||
| 话术库分类列表 | `POST /api/material/dialogue/category/list` | `isQy`(bool, 可选,是否属于企业) | `list`(repeated MaterialDialogueCategoryItem) |
|
||||
| 话术库分类更新 | `POST /api/material/dialogue/category/update` | `id`(int64, 可选);`name`(string, 可选) | 空对象或无业务数据 |
|
||||
| 话术库分类删除 | `POST /api/material/dialogue/category/del` | `id`(int64, 可选) | 空对象或无业务数据 |
|
||||
| 话术库标签创建 | `POST /api/material/dialogue/tag/add` | `name`(string, 可选,类别名) | `id`(int64,id) |
|
||||
| 话术库标签列表 | `POST /api/material/dialogue/tag/list` | `{}` | `list`(repeated MaterialDialogueTagItem) |
|
||||
| 话术库标签更新 | `POST /api/material/dialogue/tag/update` | `id`(int64, 可选);`name`(string, 可选) | 空对象或无业务数据 |
|
||||
| 话术库分类删除 | `POST /api/material/dialogue/tag/del` | `id`(int64, 可选) | 空对象或无业务数据 |
|
||||
| 为话术库设置分类或者标签 | `POST /api/material/dialogue/setCategoryOrTag` | `dialogueId`(repeated int64, 必填,素材id);`categoryId`(int64, 可选,类别id);`tagIds`(repeated int64, 可选,标签id);`needDelTagIds`(repeated int64, 可选,要删除的标签id) | 空对象或无业务数据 |
|
||||
| 获取oss上传的token,有效期5分钟 | `POST /api/material/getOssToken` | `type`(string, 必填,素材类型 image video等);`original`(string, 必填,来源 messagePush material等) | `accessID`(string,阿里云accessid);`host`(string,阿里云host);`policy`(string,阿里云policy);`signature`(string,阿里云signature);`dir`(string,阿里云文件目录);`expire`(int64,阿里云expire 毫秒);`domain`(string,阿里云domain) |
|
||||
|
||||
|
||||
## 常用示例
|
||||
|
||||
```bash
|
||||
htsy-cli call /api/material/list -d '{"page":1,"pageSize":20,"type":"image"}'
|
||||
htsy-cli call /api/material/add -d '{"type":"text","name":"问候语","text":{"content":"你好"}}'
|
||||
htsy-cli call /api/material/dialogue/list -d '{"page":1,"pageSize":20}'
|
||||
```
|
||||
@@ -0,0 +1,14 @@
|
||||
# 海豚私域接口参考索引
|
||||
|
||||
本 skill 的接口按模块拆分。处理具体请求时只读取相关模块文件,避免加载无关接口。
|
||||
|
||||
- 通用字段和消息体:[api-common.md](api-common.md)
|
||||
- 账号、用户、席位、角色、订单、通知、操作记录:[api-account.md](api-account.md)
|
||||
- 微号管理、登录、发消息:[api-bot.md](api-bot.md)
|
||||
- 客户、联系人、标签:[api-friend.md](api-friend.md)
|
||||
- 群、群成员、群运营:[api-group.md](api-group.md)
|
||||
- 素材、话术库、上传 token:[api-material.md](api-material.md)
|
||||
- 自动化、群发、关键词、SOP、营销计划:[api-automation.md](api-automation.md)
|
||||
- 客服与知识库:[api-customer.md](api-customer.md)
|
||||
|
||||
排除原则:不面向用户直接调用的协议实例、Cron、客户端节点、回调上报、内部专用、第三方特供接口不写入模块参考;除非用户明确说明是在维护服务端内部代码,否则不要主动调用这些接口。
|
||||
Reference in New Issue
Block a user