请求地址
POST https://api.qingluanbot.com/qingluan/api/message/groupSend
请求示例
curl -X POST 'https://api.qingluanbot.com/qingluan/api/message/groupSend' \
-H 'QL-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"appid": "we_xxxxxxxxxxxxxxx",
"customerGroup": true,
"contentList": [
{
"contentType": 0,
"content": [
{
"type": 3,
"text": "示例内容"
},
{
"type": 0,
"text": "示例内容"
}
]
},
{
"contentType": 14,
"content": {
"id": "<sample-media-id>",
"size": 570260,
"width": 1000000000000001,
"height": 1792,
"aesKey": "00000000000000000000000000000000",
"md5": "00000000000000000000000000000000"
}
},
{
"contentType": 22,
"content": {
"id": "<id-已脱敏>",
"size": 285357,
"duration": 2,
"width": 1000000000000001,
"height": 720,
"thumbUrl": "https://example.com/sample",
"md5": "00000000000000000000000000000000"
}
},
{
"contentType": 20,
"content": {}
}
],
"receiverList": [
10000000000000001
],
"materialId": 1000000000000001
}'
请求参数
| 字段 | 类型 | 要求 | 说明 |
|---|
appid | string | 必填 | 青鸾实例 ID,形如 we_xxxxxxxxxxxxxxx。在开发者控制台「实例与回调」扫码上号后获得。 |
customerGroup | boolean | 必填 | 是否发送到客户群,布尔值。只接受 true / false —— 传数字 0 或字符串 "0" 都会被拒绝。 |
contentList | array<object> | 必填 | 消息内容列表。元素为 {contentType, content, appInfo},其中 content 本身是数组,如 [{"type": 0, "text": "内容"}]。 |
receiverList | array<integer> | 必填 | 接收人 ID 列表。元素必须是 uint64 数字,传字符串会被拒绝。 |
materialId | integer | 必填 | 群发素材 ID,可从群发素材列表或待发送任务中获取。 注意:固定传 0。是否允许为 0、以及与 contentList 的互斥/共存关系,均未确认。 |
响应判断
能力层接口返回包含 code、message、time 与 data 等字段;请以 code=0 判断业务成功。HTTP 200 只表示网关已返回响应,不能替代业务状态判断。
可能的响应状态
| HTTP 状态 | 公开契约说明 |
|---|
200 | 原样返回(code = 0 即成功) |
403 | 受控接口,需通过控制台配置 |
404 | appid 不存在或无权访问 |
200 响应示例
{
"code": 0,
"data": {
"msgId": 0
},
"detail": "",
"message": "ok",
"time": "2026-07-21 07:33:17"
}
接入步骤
- 在青鸾开发者控制台创建或查看 API Key。
- 在「实例与回调」接入企业微信账号,取得
appid。 - 请求头携带
QL-Key,按当前契约提交 JSON 请求。 - 读取响应中的
code;仅当 code=0 时按成功流程处理。