# 发送卡片消息

# 卡片消息
卡片消息,是黑盒语音定制化的一种结构消息,相比Markdown消息提供了更多丰富的样式,更加易用的交互
卡片消息编辑器:[点击使用](https://bot.xiaoheihe.cn/message/card/create)
卡片消息数据结构:[点击了解](https://1hzf66k6rg.apifox.cn/5457705m0)
由于卡片消息的结构比较复杂,建议开发者在卡片消息编辑器尝试各种组合

# 发送卡片消息
卡片消息的类型msg_type = 20,要发送如下图所示的卡片消息到频道中,需要将json 序列化为string字符串,点击此处查看相关请求[发送卡片消息](https://s.apifox.cn/43256fe4-9a8c-4f22-949a-74a3f8b431f5/231244234e0.md)

```
{
    "addition": "{}",
    "room_id": "3690042373845835xxx",
    "channel_id": "3690042373983952xxx",
    "heychat_ack_id": "0",
    "msg_type": 20,
    "msg": "{\"data\":[{\"type\":\"card\",\"modules\":[{\"type\":\"section\",\"paragraph\":[{\"type\":\"plain-text\",\"text\":\"黑盒语音\"}]},{\"type\":\"section\",\"paragraph\":[{\"type\":\"markdown\",\"text\":\"**黑盒语音**\"}]},{\"type\":\"section\",\"paragraph\":[{\"type\":\"plain-text\",\"text\":\"黑盒语音\"},{\"type\":\"markdown\",\"text\":\"**黑盒语音**\"},{\"type\":\"plain-text\",\"text\":\"黑盒语音\"}]},{\"type\":\"section\",\"paragraph\":[{\"type\":\"plain-text\",\"text\":\"123\"},{\"type\":\"image\",\"url\":\"https://chat.max-c.com/pic/1844295655587745795.gif\",\"size\":\"medium\",\"width\":144,\"height\":144}]},{\"type\":\"section\",\"paragraph\":[{\"type\":\"plain-text\",\"text\":\"123\"},{\"type\":\"button\",\"event\":\"link-to\",\"value\":\"https://chat.top\",\"text\":\"跳转\",\"theme\":\"success\",\"size\":\"lg\"}]}]}]}",
    "reply_id": ""
}
```
![](https://imgheybox.max-c.com/oa/2024/11/07/94a77ad1a73b785145fd9dd35991f317.png)

[点击此处了解卡片消息数据构造](https://apifox.com/apidoc/shared/43256fe4-9a8c-4f22-949a-74a3f8b431f5/6997517m0)
