仪表盘
0
应用数量
0
今日推送
0
今日成功
应用状态
最近推送
应用管理
全局配置
修改密码
消息测试
推送日志
API 文档
推送接口
POST /webhook/{slug}/send
Authorization: Bearer <WEBHOOK_TOKEN>
Content-Type: application/json
{
"msg_type": "text",
"content": "消息内容",
"to_user": "@all"
}
GET 简化调用
GET /webhook/{slug}/send?token=<TOKEN>&msg_type=text&content=hello
支持的消息类型
| msg_type | 说明 | 额外字段 |
|---|---|---|
| text | 文本消息 | — |
| markdown | Markdown(仅企微客户端渲染) | — |
| textcard | 文本卡片 | title, url |
| news | 图文消息 | title, url, pic_url |
curl 示例
curl -X POST http://localhost:9000/webhook/{slug}/send \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"msg_type":"text","content":"Hello!"}'
Python 示例
import requests
requests.post("http://localhost:9000/webhook/{slug}/send",
headers={"Authorization": "Bearer YOUR_TOKEN"},
json={"msg_type": "text", "content": "Hello!"})