语聚AI
  1. 对话消息接收与发送
语聚AI
  • 语聚AI应用助手API使用说明
  • AI助手 API
    • 验证apiKey
      GET
    • 查询指定AI助手下的动作列表(工具列表)
      GET
    • 执行动作(文本格式)
      POST
    • 执行动作(NLP方式)
      POST
    • 获取动作配置页面地址
      GET
    • 查询执行日志记录
      GET
    • 创建会话消息
      POST
  • 外部联系人API
    • 查询外部联系人(详情)
      GET
    • 查询外部联系人(列表)
      POST
    • 删除外部联系人
      DELETE
    • 创建外部联系人
      POST
    • 更新外部联系人
      PUT
  • 知识库
    • 查询文本知识库列表
      GET
    • 现有文本知识库中同步新内容
      POST
    • 查询知识库内容
      GET
    • 更新知识库内容
      PUT
    • 查询文本知识库文档文件列表
      GET
  • 通用功能API
    • 查询账户当前余额
    • 查询助手列表
    • 发送消息给指定用户
    • 费用明细查询接口
  • AI营销
    • AI外呼
      • 添加号码到外呼任务中
      • 获取外呼任务列表
      • 添加CRM公海线索后同步到外呼任务
      • 添加CRM公海线索
      • 重置指定号码外呼状态
      • 添加指定号码到黑名单
      • 查询通话记录
      • 下载通话录音
      • 黑名单组列表
      • 查询通话记录ID列表
      • 查询联系人字段列表
    • 企业微信代运营/托管
      • 对话消息接收与发送
        • 对话消息回调
          GET
        • 发送消息
          POST
      • 群管理
        • 创建企业微信群
        • 获取群列表信息
        • 查询指定用户下所在群信息
        • 入群事件回调
        • 离群事件回调
      • 外部联系人
        • 获取企业联系人列表
        • 创建好友添加任务
        • 好友通过事件回调
      • 基础设置
        • 获取当前企业托管账号列表
        • 获取企业员工列表
  1. 对话消息接收与发送

对话消息回调

GET
/notice
使用回调时,先进入AI微信营销中(https://apps.yuju-ai.com/WeChatMarket/api?channel=member-ai-chat), 将回调地址修改为您系统的回调地址。
请注意此修改将导致AI营销中的托管数据无法收取(因为数据已同步到您的回调地址中)

请求参数

Body 参数application/json
data
object 
必需
messageId
string 
消息id
可选
chatId
string 
对话id(表示一个bot和一个客户)
可选
avatar
string 
客户或者群头像
可选
roomTopic
string 
群名
可选
roomId
string 
群聊的系统wxid
可选
contactName
string 
客户姓名
可选
contactId
string 
客户的系统wxid
可选
payload
消息内容
可选
type
enum<number> 
消息的payload
可选
枚举值:
012345678910111213151699991000010001
timestamp
string 
消息时间戳
必需
token
string 
企业级token
可选
botId
string 
bot的账号id
可选
contactType
enum<number> 
客户的类型
可选
枚举值:
0123
coworker
boolean 
是否为内部员工
可选
botWxid
string 
托管账号对应成员的系统wxid
可选
botWeixin
string 
bot的企业微信userId
可选
source
enum<number> 
消息来源,具体来源信息参考下面的枚举定义
可选
枚举值:
01234567
sendBy
string 
消息发送者的秒回id,仅当消息为消息为托管账号发送的,且消息来源为小组级控制台手动发消息时有效
可选
isSelf
boolean 
消息是否是托管账号自己发送的消息
可选
mentionSelf
boolean 
当前消息是否@了托管账号
必需
externalUserId
string 
客户的企业微信externalUserId
可选
roomWecomChatId
string 
群的企微chatId
可选
示例
{
    "data": {
        "messageId": "string",
        "chatId": "string",
        "avatar": "string",
        "roomTopic": "string",
        "roomId": "string",
        "contactName": "string",
        "contactId": "string",
        "payload": {
            "content": "string"
        },
        "type": 0,
        "timestamp": "string",
        "token": "string",
        "botId": "string",
        "contactType": 0,
        "coworker": true,
        "botWxid": "string",
        "botWeixin": "string",
        "source": 0,
        "sendBy": "string",
        "isSelf": true,
        "mentionSelf": true,
        "externalUserId": "string",
        "roomWecomChatId\t": "string"
    }
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://chat.jijyun.cn/notice' \
--header 'Content-Type: application/json' \
--data-raw '{
    "data": {
        "messageId": "string",
        "chatId": "string",
        "avatar": "string",
        "roomTopic": "string",
        "roomId": "string",
        "contactName": "string",
        "contactId": "string",
        "payload": {
            "content": "string"
        },
        "type": 0,
        "timestamp": "string",
        "token": "string",
        "botId": "string",
        "contactType": 0,
        "coworker": true,
        "botWxid": "string",
        "botWeixin": "string",
        "source": 0,
        "sendBy": "string",
        "isSelf": true,
        "mentionSelf": true,
        "externalUserId": "string",
        "roomWecomChatId\t": "string"
    }
}'

返回响应

🟢200成功
application/json
Body
object {0}
示例
{}
上一页
查询联系人字段列表
下一页
发送消息
Built with