{
"event": "message.send",
"call_id": "6cf8c876eeefdca168ae7a08cb93fe20",
"company": "test",
"channel": "chatbot",
"channel_id": "sicepat_whatsapp",
"user": {
"id": "123",
"name": "nick"
},
"messages": [
{
// text 消息示例
"msg_id": "c98a99f32afab85d709ba23820fccccb",
"sender_type": "robot",
"timestamp": 1722223064,
"content": {
"type": "text",
"text": "hi"
}
},
{
// image 消息示例
"msg_id": "c98a99f32afab85d709ba23820fccccb",
"sender_type": "robot",
"timestamp": 1722223064,
"content": {
"type": "image",
"media": {
"origin_url": "https://www.airudder.com/xxxx.jpg"
}
}
},
{
// video 消息示例
"msg_id": "c98a99f32afab85d709ba23820fccccb",
"sender_type": "robot",
"timestamp": 1722223064,
"content": {
"type": "video",
"media": {
"origin_url": "https://www.airudder.com/xxxx.mp4"
}
}
},
{
// audio 消息示例
"msg_id": "c98a99f32afab85d709ba23820fccccb",
"sender_type": "robot",
"timestamp": 1722223064,
"content": {
"type": "audio",
"media": {
"origin_url": "https://www.airudder.com/xxx.wav"
}
}
},
{
// file 消息示例
"msg_id": "c98a99f32afab85d709ba23820fccccb",
"sender_type": "robot",
"timestamp": 1722223064,
"content": {
"type": "file",
"media": {
"origin_url": "https://www.airudder.com/xxxx.pdf",
"name": "filename"
}
}
},
{
// interactive list 消息示例
"msg_id": "c98a99f32afab85d709ba23820fccccb",
"sender_type": "robot",
"timestamp": 1722223064,
"content": {
"type": "interactive",
"interactive": {
"type": "list",
"body": {
"text": "请选择你要咨询的业务类(本次通过list展示)"
},
"action": {
"button": "请选择", // 若list做成弹出式,则字段为按钮文案,否则可不用
"sections": [
{
"title": "查询类", // list 选项一级选项
// list 选项二级选项
"rows": [
{
"id": "59a3d8ba24ec0d29334775623182facf-3-1-list-0-0-", // 选项的唯一标识
"title": "物流查询" // 选项文案
},
{
"id": "59a3d8ba24ec0d29334775623182facf-3-1-list-0-1-",
"title": "网点查询"
}
]
},
{
"title": "寄件类",
"rows": [
{
"id": "59a3d8ba24ec0d29334775623182facf-3-1-list-1-0-",
"title": "大件快递"
},
{
"id": "59a3d8ba24ec0d29334775623182facf-3-1-list-1-1-",
"title": "小件快递"
}
]
}
]
}
}
}
},
{
// interactive button 消息示例
"msg_id": "9f856b06d44a48e39723ee9c4403cd5a",
"sender_type": "robot",
"timestamp": 1722223026,
"content": {
"type": "interactive",
"interactive": {
"type": "button",
"body": {
"text": "请选择您的性别(button)👉👉👉"
},
"action": {
// 按钮集合
"buttons": [
{
"type": "reply", // 每个按钮固定为 reply 类型
"reply": {
"id": "59a3d8ba24ec0d29334775623182facf-2-1-button-0-", // 按钮的唯一标识
"title": "男" // 按钮文案
}
},
{
"type": "reply",
"reply": {
"id": "59a3d8ba24ec0d29334775623182facf-2-1-button-1-",
"title": "女"
}
},
{
"type": "reply",
"reply": {
"id": "59a3d8ba24ec0d29334775623182facf-2-1-button-2-",
"title": "其他"
}
}
]
}
}
}
}
]
}
curl --location --request POST 'https://api.airudder.com' \
--header 'X-AIRudder-Sign;' \
--header 'Content-Type: application/json' \
--data-raw '{
"event": "message.send",
"call_id": "6cf8c876eeefdca168ae7a08cb93fe20",
"company": "test",
"channel": "chatbot",
"channel_id": "sicepat_whatsapp",
"user": {
"id": "123",
"name": "nick"
},
"messages": [
{
// text 消息示例
"msg_id": "c98a99f32afab85d709ba23820fccccb",
"sender_type": "robot",
"timestamp": 1722223064,
"content": {
"type": "text",
"text": "hi"
}
},
{
// image 消息示例
"msg_id": "c98a99f32afab85d709ba23820fccccb",
"sender_type": "robot",
"timestamp": 1722223064,
"content": {
"type": "image",
"media": {
"origin_url": "https://www.airudder.com/xxxx.jpg"
}
}
},
{
// video 消息示例
"msg_id": "c98a99f32afab85d709ba23820fccccb",
"sender_type": "robot",
"timestamp": 1722223064,
"content": {
"type": "video",
"media": {
"origin_url": "https://www.airudder.com/xxxx.mp4"
}
}
},
{
// audio 消息示例
"msg_id": "c98a99f32afab85d709ba23820fccccb",
"sender_type": "robot",
"timestamp": 1722223064,
"content": {
"type": "audio",
"media": {
"origin_url": "https://www.airudder.com/xxx.wav"
}
}
},
{
// file 消息示例
"msg_id": "c98a99f32afab85d709ba23820fccccb",
"sender_type": "robot",
"timestamp": 1722223064,
"content": {
"type": "file",
"media": {
"origin_url": "https://www.airudder.com/xxxx.pdf",
"name": "filename"
}
}
},
{
// interactive list 消息示例
"msg_id": "c98a99f32afab85d709ba23820fccccb",
"sender_type": "robot",
"timestamp": 1722223064,
"content": {
"type": "interactive",
"interactive": {
"type": "list",
"body": {
"text": "请选择你要咨询的业务类(本次通过list展示)"
},
"action": {
"button": "请选择", // 若list做成弹出式,则字段为按钮文案,否则可不用
"sections": [
{
"title": "查询类", // list 选项一级选项
// list 选项二级选项
"rows": [
{
"id": "59a3d8ba24ec0d29334775623182facf-3-1-list-0-0-", // 选项的唯一标识
"title": "物流查询" // 选项文案
},
{
"id": "59a3d8ba24ec0d29334775623182facf-3-1-list-0-1-",
"title": "网点查询"
}
]
},
{
"title": "寄件类",
"rows": [
{
"id": "59a3d8ba24ec0d29334775623182facf-3-1-list-1-0-",
"title": "大件快递"
},
{
"id": "59a3d8ba24ec0d29334775623182facf-3-1-list-1-1-",
"title": "小件快递"
}
]
}
]
}
}
}
},
{
// interactive button 消息示例
"msg_id": "9f856b06d44a48e39723ee9c4403cd5a",
"sender_type": "robot",
"timestamp": 1722223026,
"content": {
"type": "interactive",
"interactive": {
"type": "button",
"body": {
"text": "请选择您的性别(button)👉👉👉"
},
"action": {
// 按钮集合
"buttons": [
{
"type": "reply", // 每个按钮固定为 reply 类型
"reply": {
"id": "59a3d8ba24ec0d29334775623182facf-2-1-button-0-", // 按钮的唯一标识
"title": "男" // 按钮文案
}
},
{
"type": "reply",
"reply": {
"id": "59a3d8ba24ec0d29334775623182facf-2-1-button-1-",
"title": "女"
}
},
{
"type": "reply",
"reply": {
"id": "59a3d8ba24ec0d29334775623182facf-2-1-button-2-",
"title": "其他"
}
}
]
}
}
}
}
]
}'
{}