API接口文档 (小组级)
  1. 消息接口
API接口文档 (小组级)
  • 接入说明
  • 快速入门
    • 加密手机号加好友方案
    • 加密版接口
    • 如何发送一条消息
    • 通过接口实现群发
    • 加密externalUserId打通方案
    • unionId打通方案
  • 接口文档
    • 小组级接口
      • 小组级接口说明
      • 基础接口
        • 获取托管企业微信列表
        • 获取个人微信授权到期及首次扫码登录的时间
        • 获取联系人列表
        • 获取群列表
        • 获取群列表(不包含成员信息)
        • 发送系统通知
        • 获取自定义标签列表
        • 获取组内员工列表
      • 群聊接口
        • 加入群聊
        • 退出群聊事件回调
        • 加入群聊事件回调
        • 更改群名事件回调
        • 创建群聊
        • 通过联系人id获取联系人所在群聊
      • 会话接口
        • 开发建议
        • 获取指定会话
        • 获取会话列表
        • 会话事件回调
        • 分配会话
        • 消息置顶
      • 加好友接口
        • 通过手机号加好友接口
        • 加好友任务成功回调
        • 好友通过后回调
        • 群聊加好友接口
      • 消息接口
        • 获取原图
          POST
        • 发送消息
          POST
        • 小组级接收消息回调
          POST
        • 聊天历史
          GET
        • 企微id发消息
          POST
      • 群发接口
        • 创建群发
        • 创建群发 Copy
        • 重发群发
        • 取消群发
        • 删除群发
        • 群发回调
        • 获取群发任务的失败列表
        • 获取群发任务的没有发送的列表
        • 获取群发任务的进度
    • 自建应用依赖接口
      • 自建应用依赖接口说明
      • 客户信息接口
        • 修改客户备注
        • 添加跟进记录
      • 雷达接口
        • 雷达访问接口
      • id信息获取接口
        • 获取chatId
        • 通过unionId获取chatId
    • 废弃接口
      • 会话小结
      • 渠道二维码管理
        • 获取渠道列表(企业控制台数据)
      • 通过企微id群聊加好友
      • 新增客户
      • 获取成员详情
      • 获取客户列表(2023/12/05 废弃)
      • 秒回数据同步
      • 获取群列表
      • 获取客户详情
      • 获取群信息
      • 绑定企业微信官方ID
      • 通过externalUserId获取chatId
      • 获取群列表(2023/2/05 废弃)
  • 更新日志
    • 更新日志
  1. 消息接口

小组级接收消息回调

开发中
POST
/message
功能描述:
本接口为小组级接收消息回调,系统后台会将接收到的托管账号消息、外部客户消息一起进行回调
回调地址:小组控制台->api接入->回调地址

请求参数

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> 
消息来源,具体来源信息参考下面的枚举定义
可选
枚举值:
0134567
sendBy
string 
消息发送者的秒回id,仅当消息为消息为托管账号发送的,且消息来源为小组级控制台手动发消息时有效
可选
isSelf
boolean 
消息是否是托管账号自己发送的消息
可选
mentionSelf
boolean 
当前消息是否@了托管账号
必需
externalUserId
string 
客户的企业微信externalUserId
可选
roomWecomChatId
string 
群的企微chatId
可选
示例
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string",
          "title": "企业级token"
        },
        "botId": {
          "type": "string",
          "title": "bot的账号id"
        },
        "chatId": {
          "type": "string",
          "title": "对话id(表示一个bot和一个客户)"
        },
        "avatar": {
          "type": "string",
          "title": "客户或者群头像"
        },
        "coworker": {
          "type": "boolean",
          "title": "是否为内部员工"
        },
        "externalUserId": {
          "type": "string",
          "title": "客户的企业微信externalUserId"
        },
        "contactName": {
          "type": "string",
          "title": "客户姓名"
        },
        "roomWecomChatId\t": {
          "type": "string",
          "title": "群的企微chatId"
        },
        "roomTopic": {
          "type": "string",
          "title": "群名"
        },
        "messageId": {
          "type": "string",
          "title": "消息id"
        },
        "isSelf": {
          "type": "boolean",
          "title": "消息是否是托管账号自己发送的消息"
        },
        "sendBy": {
          "type": "string",
          "title": "消息发送者的秒回id,仅当消息为消息为托管账号发送的,且消息来源为小组级控制台手动发消息时有效"
        },
        "source": {
          "type": "number",
          "title": "消息来源,具体来源信息参考下面的枚举定义",
          "enum": [
            0,
            1,
            2,
            3,
            4,
            5,
            6,
            7
          ],
          "x-apifox-enum": [
            {
              "name": "",
              "value": 0,
              "description": "手机推送过来的消息"
            },
            {
              "name": "",
              "value": 1,
              "description": "小组级控制台手动发送消息"
            },
            {
              "name": "",
              "value": 2,
              "description": "群发"
            },
            {
              "name": "",
              "value": 3,
              "description": "自动回复"
            },
            {
              "name": "",
              "value": 4,
              "description": "创建群聊"
            },
            {
              "name": "",
              "value": 5,
              "description": "其他机器人回复"
            },
            {
              "name": "",
              "value": 6,
              "description": "api发消息"
            },
            {
              "name": "",
              "value": 7,
              "description": "sop功能"
            }
          ]
        },
        "contactType": {
          "type": "number",
          "title": "客户的类型",
          "enum": [
            0,
            1,
            2,
            3
          ],
          "x-apifox-enum": [
            {
              "name": "",
              "value": 0,
              "description": "未知类型的联系人"
            },
            {
              "name": "",
              "value": 1,
              "description": "个人微信"
            },
            {
              "name": "",
              "value": 2,
              "description": "公众号"
            },
            {
              "name": "",
              "value": 3,
              "description": "企业微信"
            }
          ]
        },
        "payload": {
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": false,
              "x-apifox-orders": [
                "content"
              ],
              "title": "未知",
              "properties": {
                "content": {
                  "type": "string",
                  "title": "文件名",
                  "description": "消息内容转成字符串"
                }
              },
              "required": [
                "content"
              ],
              "description": "当type为0时"
            },
            {
              "type": "object",
              "additionalProperties": false,
              "x-apifox-orders": [
                "name",
                "fileUrl",
                "size\t"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "title": "文件名"
                },
                "fileUrl": {
                  "type": "string",
                  "title": "文件地址"
                },
                "size\t": {
                  "type": "number",
                  "title": "文件大小"
                }
              },
              "required": [
                "name",
                "fileUrl"
              ],
              "title": "文件消息",
              "description": "当type为1时"
            },
            {
              "type": "object",
              "properties": {
                "voiceUrl": {
                  "type": "string",
                  "title": "语音地址"
                },
                "duration": {
                  "type": "number",
                  "title": "时长"
                }
              },
              "x-apifox-orders": [
                "voiceUrl",
                "duration"
              ],
              "required": [
                "voiceUrl",
                "duration"
              ],
              "title": "语音消息",
              "description": "当type为2时"
            },
            {
              "type": "object",
              "properties": {
                "avatar": {
                  "type": "string",
                  "title": "头像"
                },
                "coworker\t": {
                  "type": "boolean",
                  "title": "是否为内部员工"
                },
                "friend": {
                  "type": "boolean",
                  "title": "是否为好友"
                },
                "gender": {
                  "type": "number",
                  "title": "性别",
                  "enum": [
                    0,
                    1,
                    2
                  ],
                  "x-apifox-enum": [
                    {
                      "name": "",
                      "value": 0,
                      "description": "未知"
                    },
                    {
                      "name": "",
                      "value": 1,
                      "description": "男"
                    },
                    {
                      "name": "",
                      "value": 2,
                      "description": "女"
                    }
                  ]
                },
                "wxid": {
                  "type": "string",
                  "title": "名片客户系统wxid"
                },
                "name": {
                  "type": "string",
                  "title": "名字"
                },
                "type\t": {
                  "type": "number",
                  "title": "类型",
                  "enum": [
                    0,
                    1,
                    2,
                    3
                  ],
                  "x-apifox-enum": [
                    {
                      "name": "",
                      "value": 0,
                      "description": "未知"
                    },
                    {
                      "name": "",
                      "value": 1,
                      "description": "个人微信"
                    },
                    {
                      "name": "",
                      "value": 2,
                      "description": "公众号"
                    },
                    {
                      "name": "",
                      "value": 3,
                      "description": "企业微信"
                    }
                  ]
                },
                "weixin": {
                  "type": "string",
                  "title": "微信号/企业微信(名字全拼)"
                }
              },
              "title": "名片消息",
              "description": "当type为3时",
              "x-apifox-orders": [
                "avatar",
                "coworker\t",
                "friend",
                "gender",
                "wxid",
                "name",
                "type\t",
                "weixin"
              ],
              "required": [
                "avatar",
                "coworker\t",
                "weixin",
                "type\t",
                "name",
                "wxid",
                "gender",
                "friend"
              ]
            },
            {
              "type": "object",
              "properties": {
                "content": {
                  "type": "string",
                  "title": "消息内容转成字符串"
                }
              },
              "title": "聊天历史消息",
              "description": "当type为4时",
              "x-apifox-orders": [
                "content"
              ],
              "required": [
                "content"
              ]
            },
            {
              "type": "object",
              "properties": {
                "imageUrl\t": {
                  "type": "string",
                  "title": "表情地址"
                }
              },
              "x-apifox-orders": [
                "imageUrl\t"
              ],
              "title": "表情消息",
              "description": "当type为5时",
              "required": [
                "imageUrl\t"
              ]
            },
            {
              "type": "object",
              "properties": {
                "imageUrl": {
                  "type": "string",
                  "title": "压缩图片地址"
                },
                "size": {
                  "type": "number",
                  "title": "图片地址大小"
                },
                "artwork": {
                  "type": "object",
                  "properties": {},
                  "title": "原图数据",
                  "x-apifox-orders": []
                },
                "artwork.height": {
                  "type": "number",
                  "title": "原图高"
                },
                "artwork.width": {
                  "type": "string",
                  "title": "原图宽"
                }
              },
              "title": "图片消息",
              "description": "当type为6时",
              "x-apifox-orders": [
                "imageUrl",
                "size",
                "artwork",
                "artwork.height",
                "artwork.width"
              ],
              "required": [
                "imageUrl",
                "artwork.width",
                "artwork.height"
              ]
            },
            {
              "type": "object",
              "properties": {
                "text\t": {
                  "type": "string",
                  "title": "消息内容"
                },
                "mention": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "title": "被@的人的wxid"
                }
              },
              "title": "文字消息",
              "description": "当type为7时",
              "x-apifox-orders": [
                "text\t",
                "mention"
              ],
              "required": [
                "text\t"
              ]
            },
            {
              "type": "object",
              "properties": {
                "content": {
                  "type": "string",
                  "title": "消息内容转成字符串"
                }
              },
              "title": "位置消息",
              "description": "当type为8时",
              "x-apifox-orders": [
                "content"
              ],
              "required": [
                "content"
              ]
            },
            {
              "type": "object",
              "properties": {
                "nickname": {
                  "type": "string",
                  "title": "封面图url"
                },
                "url\t": {
                  "type": "string",
                  "title": "视频号地址"
                },
                "appid": {
                  "type": "string",
                  "title": "关联的公众号ID"
                },
                "description": {
                  "type": "string",
                  "title": "小程序描述"
                },
                "pagePath": {
                  "type": "string",
                  "title": "跳转路径"
                },
                "thumbKey\t": {
                  "type": "string",
                  "title": "封面图加密数据"
                },
                "title": {
                  "type": "string",
                  "title": "小程序标题"
                },
                "username": {
                  "type": "string",
                  "title": "小程序ID"
                },
                "iconUrl": {
                  "type": "string",
                  "title": "icon地址"
                }
              },
              "title": "小程序消息",
              "description": "当type为9时",
              "x-apifox-orders": [
                "appid",
                "description",
                "pagePath",
                "thumbKey\t",
                "nickname",
                "title",
                "url\t",
                "username",
                "iconUrl"
              ],
              "required": [
                "appid",
                "pagePath",
                "description",
                "username",
                "url\t",
                "title"
              ]
            },
            {
              "type": "object",
              "properties": {
                "content": {
                  "type": "string",
                  "title": "消息内容转成字符串"
                }
              },
              "title": "钱相关消息",
              "description": "当type为10时",
              "x-apifox-orders": [
                "content"
              ],
              "required": [
                "content"
              ]
            },
            {
              "type": "object",
              "properties": {
                "content": {
                  "type": "string",
                  "title": "消息内容转成字符串"
                }
              },
              "title": "撤回消息",
              "description": "当type为11时",
              "x-apifox-orders": [
                "content"
              ],
              "required": [
                "content"
              ]
            },
            {
              "type": "object",
              "properties": {
                "content": {
                  "type": "string",
                  "title": "消息内容转成字符串"
                }
              },
              "title": "图文消息",
              "description": "当type为12时",
              "x-apifox-orders": [
                "content"
              ],
              "required": [
                "content"
              ]
            },
            {
              "type": "object",
              "properties": {
                "videoUrl": {
                  "type": "string",
                  "title": "视频地址"
                },
                "duration": {
                  "type": "number",
                  "title": "时长"
                },
                "thumbnailUrl": {
                  "type": "string",
                  "title": "封面图地址"
                }
              },
              "title": "视频消息",
              "description": "当type为13时",
              "x-apifox-orders": [
                "videoUrl",
                "duration",
                "thumbnailUrl"
              ],
              "required": [
                "videoUrl",
                "thumbnailUrl"
              ]
            },
            {
              "type": "object",
              "properties": {
                "roomTopic": {
                  "type": "string",
                  "title": "群名"
                },
                "avatarUrl\t": {
                  "type": "string",
                  "title": "群头像"
                },
                "invitaterName": {
                  "type": "string",
                  "title": "邀请者名字"
                },
                "inviteModelId": {
                  "type": "string",
                  "title": "邀请者记录id"
                },
                "inviteStatus": {
                  "type": "number",
                  "title": "邀请状态",
                  "enum": [
                    0,
                    1,
                    2
                  ],
                  "x-apifox-enum": [
                    {
                      "name": "",
                      "value": 0,
                      "description": "已发送"
                    },
                    {
                      "name": "",
                      "value": 1,
                      "description": "成功"
                    },
                    {
                      "name": "",
                      "value": 2,
                      "description": "失败"
                    }
                  ]
                }
              },
              "title": "入群邀请",
              "description": "当type为9999时",
              "x-apifox-orders": [
                "roomTopic",
                "avatarUrl\t",
                "invitaterName",
                "inviteModelId",
                "inviteStatus"
              ],
              "required": [
                "roomTopic",
                "invitaterName",
                "avatarUrl\t"
              ]
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "number",
                  "enum": [
                    5,
                    6
                  ],
                  "title": "\t类型",
                  "x-apifox-enum": [
                    {
                      "name": "",
                      "value": 5,
                      "description": "RECALL_MESSAGE_FAILED"
                    },
                    {
                      "name": "",
                      "value": 6,
                      "description": "ROOM_JOIN_MEMBER"
                    }
                  ]
                },
                "subPayload": {
                  "type": "object",
                  "properties": {},
                  "x-apifox-orders": [],
                  "title": "详情"
                },
                "RecallFailedPayload.messageId": {
                  "type": "string",
                  "title": "消息id"
                },
                "RoomJoinMemberPayload.memberNames": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "title": "入群联系人名字"
                },
                "RoomJoinMemberPayload.inviterName": {
                  "type": "string",
                  "title": "邀请者姓名"
                }
              },
              "title": "系统消息",
              "description": "当type为10000时",
              "x-apifox-orders": [
                "type",
                "subPayload",
                "RecallFailedPayload.messageId",
                "RoomJoinMemberPayload.memberNames",
                "RoomJoinMemberPayload.inviterName"
              ],
              "required": [
                "type",
                "subPayload"
              ]
            },
            {
              "type": "object",
              "properties": {
                "wechatSystemPayloadType": {
                  "type": "number",
                  "enum": [
                    0,
                    1,
                    2
                  ],
                  "x-apifox-enum": [
                    {
                      "name": "",
                      "value": 0,
                      "description": "入群"
                    },
                    {
                      "name": "",
                      "value": 1,
                      "description": "离群"
                    },
                    {
                      "name": "",
                      "value": 2,
                      "description": "群名称变更"
                    }
                  ]
                },
                "subPayload": {
                  "type": "object",
                  "properties": {},
                  "x-apifox-orders": [],
                  "title": "详情"
                },
                "ContactInRoomSystemMessage.wxid": {
                  "type": "string",
                  "title": "群聊系统wxid"
                },
                "ContactInRoomSysemMessage.isSelf\t": {
                  "type": "string",
                  "title": "是否是bot自己"
                },
                "ContactInRoomSystemMessage.displayName": {
                  "type": "string",
                  "title": "展示名称"
                },
                "RoomJoinPayload.inviter": {
                  "type": "object",
                  "properties": {},
                  "x-apifox-orders": [],
                  "title": "邀请者信息"
                },
                "RoomJoinPayload.inviteeList": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "title": "被邀请者信息"
                },
                "RoomJoinPayload.timestamp": {
                  "type": "number",
                  "title": "时间戳"
                },
                "RoomLeavePayload.remover": {
                  "type": "object",
                  "properties": {},
                  "title": "踢人者",
                  "x-apifox-orders": []
                },
                "RoomLeavePayload.leaverList": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "title": "被踢者信息"
                },
                "RoomLeavePayload.timestamp": {
                  "type": "number",
                  "title": "时间戳"
                },
                "RoomTopicPayload.oldTopic": {
                  "type": "string",
                  "title": "旧群名"
                },
                "RoomTopicPayload.newTopic": {
                  "type": "string",
                  "title": "新群名"
                },
                "RoomTopicPayload.changer": {
                  "type": "object",
                  "properties": {},
                  "x-apifox-orders": [],
                  "title": "修改者信息"
                },
                "RoomTopicPayload.timestamp": {
                  "type": "number",
                  "title": "时间戳"
                }
              },
              "title": "企微系统消息",
              "description": "当type为10001时",
              "x-apifox-orders": [
                "wechatSystemPayloadType",
                "subPayload",
                "ContactInRoomSystemMessage.wxid",
                "ContactInRoomSysemMessage.isSelf\t",
                "ContactInRoomSystemMessage.displayName",
                "RoomJoinPayload.inviter",
                "RoomJoinPayload.inviteeList",
                "RoomJoinPayload.timestamp",
                "RoomLeavePayload.remover",
                "RoomLeavePayload.leaverList",
                "RoomLeavePayload.timestamp",
                "RoomTopicPayload.oldTopic",
                "RoomTopicPayload.newTopic",
                "RoomTopicPayload.changer",
                "RoomTopicPayload.timestamp"
              ],
              "required": [
                "wechatSystemPayloadType",
                "RoomJoinPayload.timestamp",
                "RoomJoinPayload.inviteeList",
                "RoomJoinPayload.inviter",
                "subPayload",
                "RoomLeavePayload.leaverList",
                "RoomTopicPayload.newTopic",
                "RoomLeavePayload.timestamp",
                "RoomTopicPayload.timestamp",
                "RoomTopicPayload.changer"
              ]
            }
          ],
          "title": "消息内容"
        },
        "roomId": {
          "type": "string",
          "title": "群聊的系统wxid"
        },
        "contactId": {
          "type": "string",
          "title": "客户的系统wxid"
        },
        "type": {
          "type": "number",
          "title": "消息的payload",
          "enum": [
            0,
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            15,
            16,
            9999,
            10000,
            10001
          ],
          "x-apifox-enum": [
            {
              "name": "",
              "value": 0,
              "description": "未知"
            },
            {
              "name": "",
              "value": 1,
              "description": "文件"
            },
            {
              "name": "",
              "value": 2,
              "description": "语音"
            },
            {
              "name": "",
              "value": 3,
              "description": "名片"
            },
            {
              "name": "",
              "value": 4,
              "description": "聊天历史"
            },
            {
              "name": "",
              "value": 5,
              "description": "表情"
            },
            {
              "name": "",
              "value": 6,
              "description": "图片"
            },
            {
              "name": "",
              "value": 7,
              "description": "文字"
            },
            {
              "name": "",
              "value": 8,
              "description": "位置"
            },
            {
              "name": "",
              "value": 9,
              "description": "小程序"
            },
            {
              "name": "",
              "value": 10,
              "description": "钱相关"
            },
            {
              "name": "",
              "value": 11,
              "description": "撤回消息"
            },
            {
              "name": "",
              "value": 12,
              "description": "图文消息"
            },
            {
              "name": "",
              "value": 13,
              "description": "视频"
            },
            {
              "name": "",
              "value": 15,
              "description": "语音/视频通话"
            },
            {
              "name": "",
              "value": 16,
              "description": "群聊接龙消息(目前无法获取具体内容)"
            },
            {
              "name": "",
              "value": 9999,
              "description": "入群邀请"
            },
            {
              "name": "",
              "value": 10000,
              "description": "系统消息"
            },
            {
              "name": "",
              "value": 10001,
              "description": "企业微信系统消息"
            }
          ]
        },
        "timestamp": {
          "type": "string",
          "title": "消息时间戳"
        },
        "botWxid": {
          "type": "string",
          "title": "托管账号对应成员的系统wxid"
        },
        "botWeixin": {
          "type": "string",
          "title": "bot的企业微信userId"
        },
        "mentionSelf": {
          "type": "boolean",
          "title": "当前消息是否@了托管账号"
        }
      },
      "x-apifox-orders": [
        "messageId",
        "chatId",
        "avatar",
        "roomTopic",
        "roomId",
        "contactName",
        "contactId",
        "payload",
        "type",
        "timestamp",
        "token",
        "botId",
        "contactType",
        "coworker",
        "botWxid",
        "botWeixin",
        "source",
        "sendBy",
        "isSelf",
        "mentionSelf",
        "externalUserId",
        "roomWecomChatId\t"
      ],
      "required": [
        "timestamp",
        "mentionSelf"
      ]
    }
  },
  "x-apifox-orders": [
    "data"
  ],
  "required": [
    "data"
  ]
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://aa-stream-api.ddregion.com/message' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "object",
    "properties": {
        "data": {
            "type": "object",
            "properties": {
                "token": {
                    "type": "string",
                    "title": "企业级token"
                },
                "botId": {
                    "type": "string",
                    "title": "bot的账号id"
                },
                "chatId": {
                    "type": "string",
                    "title": "对话id(表示一个bot和一个客户)"
                },
                "avatar": {
                    "type": "string",
                    "title": "客户或者群头像"
                },
                "coworker": {
                    "type": "boolean",
                    "title": "是否为内部员工"
                },
                "externalUserId": {
                    "type": "string",
                    "title": "客户的企业微信externalUserId"
                },
                "contactName": {
                    "type": "string",
                    "title": "客户姓名"
                },
                "roomWecomChatId\t": {
                    "type": "string",
                    "title": "群的企微chatId"
                },
                "roomTopic": {
                    "type": "string",
                    "title": "群名"
                },
                "messageId": {
                    "type": "string",
                    "title": "消息id"
                },
                "isSelf": {
                    "type": "boolean",
                    "title": "消息是否是托管账号自己发送的消息"
                },
                "sendBy": {
                    "type": "string",
                    "title": "消息发送者的秒回id,仅当消息为消息为托管账号发送的,且消息来源为小组级控制台手动发消息时有效"
                },
                "source": {
                    "type": "number",
                    "title": "消息来源,具体来源信息参考下面的枚举定义",
                    "enum": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                    ],
                    "x-apifox-enum": [
                        {
                            "name": "",
                            "value": 0,
                            "description": "手机推送过来的消息"
                        },
                        {
                            "name": "",
                            "value": 1,
                            "description": "小组级控制台手动发送消息"
                        },
                        {
                            "name": "",
                            "value": 2,
                            "description": "群发"
                        },
                        {
                            "name": "",
                            "value": 3,
                            "description": "自动回复"
                        },
                        {
                            "name": "",
                            "value": 4,
                            "description": "创建群聊"
                        },
                        {
                            "name": "",
                            "value": 5,
                            "description": "其他机器人回复"
                        },
                        {
                            "name": "",
                            "value": 6,
                            "description": "api发消息"
                        },
                        {
                            "name": "",
                            "value": 7,
                            "description": "sop功能"
                        }
                    ]
                },
                "contactType": {
                    "type": "number",
                    "title": "客户的类型",
                    "enum": [
                        0,
                        1,
                        2,
                        3
                    ],
                    "x-apifox-enum": [
                        {
                            "name": "",
                            "value": 0,
                            "description": "未知类型的联系人"
                        },
                        {
                            "name": "",
                            "value": 1,
                            "description": "个人微信"
                        },
                        {
                            "name": "",
                            "value": 2,
                            "description": "公众号"
                        },
                        {
                            "name": "",
                            "value": 3,
                            "description": "企业微信"
                        }
                    ]
                },
                "payload": {
                    "anyOf": [
                        {
                            "type": "object",
                            "additionalProperties": false,
                            "x-apifox-orders": [
                                "content"
                            ],
                            "title": "未知",
                            "properties": {
                                "content": {
                                    "type": "string",
                                    "title": "文件名",
                                    "description": "消息内容转成字符串"
                                }
                            },
                            "required": [
                                "content"
                            ],
                            "description": "当type为0时"
                        },
                        {
                            "type": "object",
                            "additionalProperties": false,
                            "x-apifox-orders": [
                                "name",
                                "fileUrl",
                                "size\t"
                            ],
                            "properties": {
                                "name": {
                                    "type": "string",
                                    "title": "文件名"
                                },
                                "fileUrl": {
                                    "type": "string",
                                    "title": "文件地址"
                                },
                                "size\t": {
                                    "type": "number",
                                    "title": "文件大小"
                                }
                            },
                            "required": [
                                "name",
                                "fileUrl"
                            ],
                            "title": "文件消息",
                            "description": "当type为1时"
                        },
                        {
                            "type": "object",
                            "properties": {
                                "voiceUrl": {
                                    "type": "string",
                                    "title": "语音地址"
                                },
                                "duration": {
                                    "type": "number",
                                    "title": "时长"
                                }
                            },
                            "x-apifox-orders": [
                                "voiceUrl",
                                "duration"
                            ],
                            "required": [
                                "voiceUrl",
                                "duration"
                            ],
                            "title": "语音消息",
                            "description": "当type为2时"
                        },
                        {
                            "type": "object",
                            "properties": {
                                "avatar": {
                                    "type": "string",
                                    "title": "头像"
                                },
                                "coworker\t": {
                                    "type": "boolean",
                                    "title": "是否为内部员工"
                                },
                                "friend": {
                                    "type": "boolean",
                                    "title": "是否为好友"
                                },
                                "gender": {
                                    "type": "number",
                                    "title": "性别",
                                    "enum": [
                                        0,
                                        1,
                                        2
                                    ],
                                    "x-apifox-enum": [
                                        {
                                            "name": "",
                                            "value": 0,
                                            "description": "未知"
                                        },
                                        {
                                            "name": "",
                                            "value": 1,
                                            "description": "男"
                                        },
                                        {
                                            "name": "",
                                            "value": 2,
                                            "description": "女"
                                        }
                                    ]
                                },
                                "wxid": {
                                    "type": "string",
                                    "title": "名片客户系统wxid"
                                },
                                "name": {
                                    "type": "string",
                                    "title": "名字"
                                },
                                "type\t": {
                                    "type": "number",
                                    "title": "类型",
                                    "enum": [
                                        0,
                                        1,
                                        2,
                                        3
                                    ],
                                    "x-apifox-enum": [
                                        {
                                            "name": "",
                                            "value": 0,
                                            "description": "未知"
                                        },
                                        {
                                            "name": "",
                                            "value": 1,
                                            "description": "个人微信"
                                        },
                                        {
                                            "name": "",
                                            "value": 2,
                                            "description": "公众号"
                                        },
                                        {
                                            "name": "",
                                            "value": 3,
                                            "description": "企业微信"
                                        }
                                    ]
                                },
                                "weixin": {
                                    "type": "string",
                                    "title": "微信号/企业微信(名字全拼)"
                                }
                            },
                            "title": "名片消息",
                            "description": "当type为3时",
                            "x-apifox-orders": [
                                "avatar",
                                "coworker\t",
                                "friend",
                                "gender",
                                "wxid",
                                "name",
                                "type\t",
                                "weixin"
                            ],
                            "required": [
                                "avatar",
                                "coworker\t",
                                "weixin",
                                "type\t",
                                "name",
                                "wxid",
                                "gender",
                                "friend"
                            ]
                        },
                        {
                            "type": "object",
                            "properties": {
                                "content": {
                                    "type": "string",
                                    "title": "消息内容转成字符串"
                                }
                            },
                            "title": "聊天历史消息",
                            "description": "当type为4时",
                            "x-apifox-orders": [
                                "content"
                            ],
                            "required": [
                                "content"
                            ]
                        },
                        {
                            "type": "object",
                            "properties": {
                                "imageUrl\t": {
                                    "type": "string",
                                    "title": "表情地址"
                                }
                            },
                            "x-apifox-orders": [
                                "imageUrl\t"
                            ],
                            "title": "表情消息",
                            "description": "当type为5时",
                            "required": [
                                "imageUrl\t"
                            ]
                        },
                        {
                            "type": "object",
                            "properties": {
                                "imageUrl": {
                                    "type": "string",
                                    "title": "压缩图片地址"
                                },
                                "size": {
                                    "type": "number",
                                    "title": "图片地址大小"
                                },
                                "artwork": {
                                    "type": "object",
                                    "properties": {},
                                    "title": "原图数据",
                                    "x-apifox-orders": []
                                },
                                "artwork.height": {
                                    "type": "number",
                                    "title": "原图高"
                                },
                                "artwork.width": {
                                    "type": "string",
                                    "title": "原图宽"
                                }
                            },
                            "title": "图片消息",
                            "description": "当type为6时",
                            "x-apifox-orders": [
                                "imageUrl",
                                "size",
                                "artwork",
                                "artwork.height",
                                "artwork.width"
                            ],
                            "required": [
                                "imageUrl",
                                "artwork.width",
                                "artwork.height"
                            ]
                        },
                        {
                            "type": "object",
                            "properties": {
                                "text\t": {
                                    "type": "string",
                                    "title": "消息内容"
                                },
                                "mention": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    },
                                    "title": "被@的人的wxid"
                                }
                            },
                            "title": "文字消息",
                            "description": "当type为7时",
                            "x-apifox-orders": [
                                "text\t",
                                "mention"
                            ],
                            "required": [
                                "text\t"
                            ]
                        },
                        {
                            "type": "object",
                            "properties": {
                                "content": {
                                    "type": "string",
                                    "title": "消息内容转成字符串"
                                }
                            },
                            "title": "位置消息",
                            "description": "当type为8时",
                            "x-apifox-orders": [
                                "content"
                            ],
                            "required": [
                                "content"
                            ]
                        },
                        {
                            "type": "object",
                            "properties": {
                                "nickname": {
                                    "type": "string",
                                    "title": "封面图url"
                                },
                                "url\t": {
                                    "type": "string",
                                    "title": "视频号地址"
                                },
                                "appid": {
                                    "type": "string",
                                    "title": "关联的公众号ID"
                                },
                                "description": {
                                    "type": "string",
                                    "title": "小程序描述"
                                },
                                "pagePath": {
                                    "type": "string",
                                    "title": "跳转路径"
                                },
                                "thumbKey\t": {
                                    "type": "string",
                                    "title": "封面图加密数据"
                                },
                                "title": {
                                    "type": "string",
                                    "title": "小程序标题"
                                },
                                "username": {
                                    "type": "string",
                                    "title": "小程序ID"
                                },
                                "iconUrl": {
                                    "type": "string",
                                    "title": "icon地址"
                                }
                            },
                            "title": "小程序消息",
                            "description": "当type为9时",
                            "x-apifox-orders": [
                                "appid",
                                "description",
                                "pagePath",
                                "thumbKey\t",
                                "nickname",
                                "title",
                                "url\t",
                                "username",
                                "iconUrl"
                            ],
                            "required": [
                                "appid",
                                "pagePath",
                                "description",
                                "username",
                                "url\t",
                                "title"
                            ]
                        },
                        {
                            "type": "object",
                            "properties": {
                                "content": {
                                    "type": "string",
                                    "title": "消息内容转成字符串"
                                }
                            },
                            "title": "钱相关消息",
                            "description": "当type为10时",
                            "x-apifox-orders": [
                                "content"
                            ],
                            "required": [
                                "content"
                            ]
                        },
                        {
                            "type": "object",
                            "properties": {
                                "content": {
                                    "type": "string",
                                    "title": "消息内容转成字符串"
                                }
                            },
                            "title": "撤回消息",
                            "description": "当type为11时",
                            "x-apifox-orders": [
                                "content"
                            ],
                            "required": [
                                "content"
                            ]
                        },
                        {
                            "type": "object",
                            "properties": {
                                "content": {
                                    "type": "string",
                                    "title": "消息内容转成字符串"
                                }
                            },
                            "title": "图文消息",
                            "description": "当type为12时",
                            "x-apifox-orders": [
                                "content"
                            ],
                            "required": [
                                "content"
                            ]
                        },
                        {
                            "type": "object",
                            "properties": {
                                "videoUrl": {
                                    "type": "string",
                                    "title": "视频地址"
                                },
                                "duration": {
                                    "type": "number",
                                    "title": "时长"
                                },
                                "thumbnailUrl": {
                                    "type": "string",
                                    "title": "封面图地址"
                                }
                            },
                            "title": "视频消息",
                            "description": "当type为13时",
                            "x-apifox-orders": [
                                "videoUrl",
                                "duration",
                                "thumbnailUrl"
                            ],
                            "required": [
                                "videoUrl",
                                "thumbnailUrl"
                            ]
                        },
                        {
                            "type": "object",
                            "properties": {
                                "roomTopic": {
                                    "type": "string",
                                    "title": "群名"
                                },
                                "avatarUrl\t": {
                                    "type": "string",
                                    "title": "群头像"
                                },
                                "invitaterName": {
                                    "type": "string",
                                    "title": "邀请者名字"
                                },
                                "inviteModelId": {
                                    "type": "string",
                                    "title": "邀请者记录id"
                                },
                                "inviteStatus": {
                                    "type": "number",
                                    "title": "邀请状态",
                                    "enum": [
                                        0,
                                        1,
                                        2
                                    ],
                                    "x-apifox-enum": [
                                        {
                                            "name": "",
                                            "value": 0,
                                            "description": "已发送"
                                        },
                                        {
                                            "name": "",
                                            "value": 1,
                                            "description": "成功"
                                        },
                                        {
                                            "name": "",
                                            "value": 2,
                                            "description": "失败"
                                        }
                                    ]
                                }
                            },
                            "title": "入群邀请",
                            "description": "当type为9999时",
                            "x-apifox-orders": [
                                "roomTopic",
                                "avatarUrl\t",
                                "invitaterName",
                                "inviteModelId",
                                "inviteStatus"
                            ],
                            "required": [
                                "roomTopic",
                                "invitaterName",
                                "avatarUrl\t"
                            ]
                        },
                        {
                            "type": "object",
                            "properties": {
                                "type": {
                                    "type": "number",
                                    "enum": [
                                        5,
                                        6
                                    ],
                                    "title": "\t类型",
                                    "x-apifox-enum": [
                                        {
                                            "name": "",
                                            "value": 5,
                                            "description": "RECALL_MESSAGE_FAILED"
                                        },
                                        {
                                            "name": "",
                                            "value": 6,
                                            "description": "ROOM_JOIN_MEMBER"
                                        }
                                    ]
                                },
                                "subPayload": {
                                    "type": "object",
                                    "properties": {},
                                    "x-apifox-orders": [],
                                    "title": "详情"
                                },
                                "RecallFailedPayload.messageId": {
                                    "type": "string",
                                    "title": "消息id"
                                },
                                "RoomJoinMemberPayload.memberNames": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    },
                                    "title": "入群联系人名字"
                                },
                                "RoomJoinMemberPayload.inviterName": {
                                    "type": "string",
                                    "title": "邀请者姓名"
                                }
                            },
                            "title": "系统消息",
                            "description": "当type为10000时",
                            "x-apifox-orders": [
                                "type",
                                "subPayload",
                                "RecallFailedPayload.messageId",
                                "RoomJoinMemberPayload.memberNames",
                                "RoomJoinMemberPayload.inviterName"
                            ],
                            "required": [
                                "type",
                                "subPayload"
                            ]
                        },
                        {
                            "type": "object",
                            "properties": {
                                "wechatSystemPayloadType": {
                                    "type": "number",
                                    "enum": [
                                        0,
                                        1,
                                        2
                                    ],
                                    "x-apifox-enum": [
                                        {
                                            "name": "",
                                            "value": 0,
                                            "description": "入群"
                                        },
                                        {
                                            "name": "",
                                            "value": 1,
                                            "description": "离群"
                                        },
                                        {
                                            "name": "",
                                            "value": 2,
                                            "description": "群名称变更"
                                        }
                                    ]
                                },
                                "subPayload": {
                                    "type": "object",
                                    "properties": {},
                                    "x-apifox-orders": [],
                                    "title": "详情"
                                },
                                "ContactInRoomSystemMessage.wxid": {
                                    "type": "string",
                                    "title": "群聊系统wxid"
                                },
                                "ContactInRoomSysemMessage.isSelf\t": {
                                    "type": "string",
                                    "title": "是否是bot自己"
                                },
                                "ContactInRoomSystemMessage.displayName": {
                                    "type": "string",
                                    "title": "展示名称"
                                },
                                "RoomJoinPayload.inviter": {
                                    "type": "object",
                                    "properties": {},
                                    "x-apifox-orders": [],
                                    "title": "邀请者信息"
                                },
                                "RoomJoinPayload.inviteeList": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    },
                                    "title": "被邀请者信息"
                                },
                                "RoomJoinPayload.timestamp": {
                                    "type": "number",
                                    "title": "时间戳"
                                },
                                "RoomLeavePayload.remover": {
                                    "type": "object",
                                    "properties": {},
                                    "title": "踢人者",
                                    "x-apifox-orders": []
                                },
                                "RoomLeavePayload.leaverList": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    },
                                    "title": "被踢者信息"
                                },
                                "RoomLeavePayload.timestamp": {
                                    "type": "number",
                                    "title": "时间戳"
                                },
                                "RoomTopicPayload.oldTopic": {
                                    "type": "string",
                                    "title": "旧群名"
                                },
                                "RoomTopicPayload.newTopic": {
                                    "type": "string",
                                    "title": "新群名"
                                },
                                "RoomTopicPayload.changer": {
                                    "type": "object",
                                    "properties": {},
                                    "x-apifox-orders": [],
                                    "title": "修改者信息"
                                },
                                "RoomTopicPayload.timestamp": {
                                    "type": "number",
                                    "title": "时间戳"
                                }
                            },
                            "title": "企微系统消息",
                            "description": "当type为10001时",
                            "x-apifox-orders": [
                                "wechatSystemPayloadType",
                                "subPayload",
                                "ContactInRoomSystemMessage.wxid",
                                "ContactInRoomSysemMessage.isSelf\t",
                                "ContactInRoomSystemMessage.displayName",
                                "RoomJoinPayload.inviter",
                                "RoomJoinPayload.inviteeList",
                                "RoomJoinPayload.timestamp",
                                "RoomLeavePayload.remover",
                                "RoomLeavePayload.leaverList",
                                "RoomLeavePayload.timestamp",
                                "RoomTopicPayload.oldTopic",
                                "RoomTopicPayload.newTopic",
                                "RoomTopicPayload.changer",
                                "RoomTopicPayload.timestamp"
                            ],
                            "required": [
                                "wechatSystemPayloadType",
                                "RoomJoinPayload.timestamp",
                                "RoomJoinPayload.inviteeList",
                                "RoomJoinPayload.inviter",
                                "subPayload",
                                "RoomLeavePayload.leaverList",
                                "RoomTopicPayload.newTopic",
                                "RoomLeavePayload.timestamp",
                                "RoomTopicPayload.timestamp",
                                "RoomTopicPayload.changer"
                            ]
                        }
                    ],
                    "title": "消息内容"
                },
                "roomId": {
                    "type": "string",
                    "title": "群聊的系统wxid"
                },
                "contactId": {
                    "type": "string",
                    "title": "客户的系统wxid"
                },
                "type": {
                    "type": "number",
                    "title": "消息的payload",
                    "enum": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        15,
                        16,
                        9999,
                        10000,
                        10001
                    ],
                    "x-apifox-enum": [
                        {
                            "name": "",
                            "value": 0,
                            "description": "未知"
                        },
                        {
                            "name": "",
                            "value": 1,
                            "description": "文件"
                        },
                        {
                            "name": "",
                            "value": 2,
                            "description": "语音"
                        },
                        {
                            "name": "",
                            "value": 3,
                            "description": "名片"
                        },
                        {
                            "name": "",
                            "value": 4,
                            "description": "聊天历史"
                        },
                        {
                            "name": "",
                            "value": 5,
                            "description": "表情"
                        },
                        {
                            "name": "",
                            "value": 6,
                            "description": "图片"
                        },
                        {
                            "name": "",
                            "value": 7,
                            "description": "文字"
                        },
                        {
                            "name": "",
                            "value": 8,
                            "description": "位置"
                        },
                        {
                            "name": "",
                            "value": 9,
                            "description": "小程序"
                        },
                        {
                            "name": "",
                            "value": 10,
                            "description": "钱相关"
                        },
                        {
                            "name": "",
                            "value": 11,
                            "description": "撤回消息"
                        },
                        {
                            "name": "",
                            "value": 12,
                            "description": "图文消息"
                        },
                        {
                            "name": "",
                            "value": 13,
                            "description": "视频"
                        },
                        {
                            "name": "",
                            "value": 15,
                            "description": "语音/视频通话"
                        },
                        {
                            "name": "",
                            "value": 16,
                            "description": "群聊接龙消息(目前无法获取具体内容)"
                        },
                        {
                            "name": "",
                            "value": 9999,
                            "description": "入群邀请"
                        },
                        {
                            "name": "",
                            "value": 10000,
                            "description": "系统消息"
                        },
                        {
                            "name": "",
                            "value": 10001,
                            "description": "企业微信系统消息"
                        }
                    ]
                },
                "timestamp": {
                    "type": "string",
                    "title": "消息时间戳"
                },
                "botWxid": {
                    "type": "string",
                    "title": "托管账号对应成员的系统wxid"
                },
                "botWeixin": {
                    "type": "string",
                    "title": "bot的企业微信userId"
                },
                "mentionSelf": {
                    "type": "boolean",
                    "title": "当前消息是否@了托管账号"
                }
            },
            "x-apifox-orders": [
                "messageId",
                "chatId",
                "avatar",
                "roomTopic",
                "roomId",
                "contactName",
                "contactId",
                "payload",
                "type",
                "timestamp",
                "token",
                "botId",
                "contactType",
                "coworker",
                "botWxid",
                "botWeixin",
                "source",
                "sendBy",
                "isSelf",
                "mentionSelf",
                "externalUserId",
                "roomWecomChatId\t"
            ],
            "required": [
                "timestamp",
                "mentionSelf"
            ]
        }
    },
    "x-apifox-orders": [
        "data"
    ],
    "required": [
        "data"
    ]
}'

返回响应

🟢200成功
application/json
Body
errcode
number 
返回码
必需
errmsg
string 
对返回码的文本描述内容
必需
示例
{
  "errcode": 0,
  "errmsg": "string"
}
上一页
发送消息
下一页
聊天历史
Built with