POST
消息

群发助手-发送(待发送消息)

POSThttps://api.xingyapi.com/api/message/groupSendPending

接口用途

用于群发助手-发送(待发送消息)。

请求说明

请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例;其他字段说明见参数表。

返回说明

统一响应信封 {ok, code, message, request_id, data};code=0 表示成功,业务数据在 data 字段。

请求参数

字段类型说明
instance_guid必填string星云实例标识(inst_xxxx),标识本次操作的账号
id必填number业务对象标识。
contentList必填array消息或素材内容列表。
conversationType必填integer会话类型标识;具体枚举以会话协议为准。

请求示例

{
  "instance_guid": "inst_xxxxxxxx",
  "id": "117159486110430465",
  "contentList": [
    {
      "contentType": 0,
      "content": [
        {
          "type": 0,
          "text": "坎坎坷坷"
        }
      ]
    }
  ],
  "conversationType": 0
}

响应字段

字段类型说明
countnumber数据总数。
isEndboolean是否已到达本次分页或同步数据末尾。
listarray业务数据列表。
list[].idnumber业务记录或消息内部标识。
list[].syncKeynumber增量同步游标,后续同步时应回传该值。
list[].roomTypeboolean会话是否为群聊的标识;具体布尔含义以服务端返回为准。
list[].fromUserIdnumber消息发送方用户标识。
list[].toUserIdnumber消息接收方用户标识。
list[].roomIdnumber群聊或客户群唯一标识。
list[].msgTypenumber消息类型编号。
list[].timestampnumber消息或事件时间戳。
list[].contentobject消息或业务内容对象;具体结构随内容类型而变化。
syncKeynumber增量同步游标,后续同步时应回传该值。

响应示例

{
  "ok": true,
  "code": 0,
  "message": "success",
  "request_id": "nb_xxxxxxxx",
  "data": {
    "count": 9,
    "isEnd": false,
    "list": [
      {
        "id": 1005584,
        "syncKey": 18185826,
        "roomType": true,
        "fromUserId": 10120,
        "toUserId": 1688858348844282,
        "roomId": 10120,
        "msgType": 31,
        "timestamp": 1783903816,
        "content": {
          "msgType": 31,
          "contentBase64": "<base64 数据,示例省略>"
        }
      },
      {
        "id": 1005595,
        "syncKey": 18185830,
        "roomType": false,
        "fromUserId": 1688858348844282,
        "toUserId": 1688852792312821,
        "msgType": 2001,
        "timestamp": 1783908138,
        "senderName": "示例名称",
        "content": {
          "msgType": 2001,
          "contentBase64": "<base64 数据,示例省略>"
        }
      },
      {
        "id": 1005600,
        "syncKey": 18185832,
        "roomType": true,
        "fromUserId": 10201,
        "roomId": 10201,
        "msgType": 2001,
        "timestamp": 1783908325,
        "senderName": "示例名称",
        "content": {
          "msgType": 2001,
          "contentBase64": "<base64 数据,示例省略>"
        }
      },
      {
        "id": 1005602,
        "syncKey": 18185833,
        "roomType": true,
        "fromUserId": 10120,
        "roomId": 10120,
        "msgType": 2001,
        "timestamp": 1783908333,
        "senderName": "示例名称",
        "content": {
          "msgType": 2001,
          "contentBase64": "<base64 数据,示例省略>"
        }
      },
      {
        "id": 1005618,
        "syncKey": 18185839,
        "roomType": true,
        "fromUserId": 10120,
        "toUserId": 1688858348844282,
        "roomId": 10120,
        "msgType": 31,
        "timestamp": 1783989306,
        "content": {
          "msgType": 31,
          "contentBase64": "<base64 数据,示例省略>"
        }
      },
      {
        "id": 1005640,
        "syncKey": 18185848,
        "roomType": true,
        "fromUserId": 10120,
        "toUserId": 1688858348844282,
        "roomId": 10120,
        "msgType": 31,
        "timestamp": 1784073685,
        "content": {
          "msgType": 31,
          "contentBase64": "<base64 数据,示例省略>"
        }
      },
      {
        "id": 1005643,
        "syncKey": 18185856,
        "roomType": true,
        "fromUserId": 10120,
        "toUserId": 1688858348844282,
        "roomId": 10120,
        "msgType": 31,
        "timestamp": 1784162270,
        "content": {
          "msgType": 31,
          "contentBase64": "<base64 数据,示例省略>"
        }
      },
      {
        "id": 1005646,
        "syncKey": 18185867,
        "roomType": true,
        "fromUserId": 10120,
        "toUserId": 1688858348844282,
        "roomId": 10120,
        "msgType": 31,
        "timestamp": 1784248068,
        "content": {
          "msgType": 31,
          "contentBase64": "<base64 数据,示例省略>"
        }
      },
      {
        "id": 1005650,
        "syncKey": 18185868,
        "roomType": true,
        "fromUserId": 10060,
        "roomId": 10060,
        "msgType": 105,
        "timestamp": 1784286458,
        "content": {
          "msgType": 105,
          "contentBase64": "<base64 数据,示例省略>"
        }
      }
    ],
    "syncKey": 18185868
  }
}

返回接口目录 · 请求规范 · 错误码

在线调试

在控制台中在线测试 API 接口无需编码,快速验证接口效果。

基础信息

Base URL复制
https://api.xingyapi.com
API Key复制
X-Nebula-Key: <API Key>
Content-Type
application/json

联系客服

客服微信二维码
微信号:xingyunbot
扫码或搜索微信号,添加客服获取支持