> For the complete documentation index, see [llms.txt](https://docs.innopaas.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.innopaas.com/api-reference/whatsapp-business-api/webhook/liao-tian-shi-shang-xia-xing-xiao-xi-shi-jian.md). Agents can also search and read this documentation through its [MCP server](https://docs.innopaas.com/~gitbook/mcp).

# 聊天室上下行消息事件

聊天室上下行消息仅针对在聊天室 的事件监听、**chat\_mt\_message\_notify（聊天室下行消息接收） 、chat\_mo\_message\_notify（聊天室上行消息接收）**

| 字段             | 数据类型   | 是否必填 | 描述                                  |
| -------------- | ------ | ---- | ----------------------------------- |
| wabaId         | String | 是    | Waba Id                             |
| from           | String | 是    | 企业Sender                            |
| to             | String | 是    | 用户WhatsApp 号码                       |
| messageType    | String | 是    | 消息类型                                |
| context        | Object | 是    | 消息内容                                |
| wamid          | String | 否    | Mete消息ID                            |
| conversationId | String | 否    | 会话ID（InnoPaaS聊天室会话ID）               |
| uid            | String | 否    | 用户自定义Id                             |
| sendTime       | String | 是    | 发送时间，UTC，如：2026-07-09T09:11:23.405Z |
| sendTimestamp  | String | 是    | 发送时间戳，精确到毫秒，如：1783588283405         |
| id             | String | 是    | Message Id                          |
| agent          | json   | 否    | 代理账号信息                              |
| assignee       | json   | 否    | 被分配账号信息                             |

agent参数

| 字段        | 数据类型   | 是否必填 | 描述   |
| --------- | ------ | ---- | ---- |
| userEmail | String | 是    | 账号邮箱 |
| userId    | String | 是    | 账号id |
| userName  | String | 是    | 账号名称 |

assignee参数

| 字段           | 数据类型   | 是否必填 | 描述                   |
| ------------ | ------ | ---- | -------------------- |
| userEmail    | String | 是    | 账号邮箱                 |
| userId       | String | 是    | 账号id                 |
| userName     | String | 是    | 账号名称                 |
| assigneeType | Int    | 是    | 0:客服，1:Bot客服，2:Agent |

**chat\_mt\_message\_notify 示例**

```json
{
    "id": "b5e984b3-21b2-42a9-b08b-72e5a4096ac6",
    "type": "chat_mt_message_notify",
    "eventTime": "2023-02-22T12:00:00.000Z",
    "body": {
        "agent": {
            "userEmail": "test01@253.com",
            "userId": "2038624",
            "userName": "test"
        },
        "assignee": {
            "assigneeType": 0,
            "userEmail": "innopaas@253.com",
            "userId": "2040160",
            "userName": "innopaas"
        },
        "wabaId": "WHATSAPP_BUSINESS_ACCOUNT_ID",
        "from": "wamid.BgNODYxN...",
        "id": "059862baa7994b1bb0***a15990667ebeb8",
        "to": "PHONE-NUMBER",
        "messageType": "text",
        "context": {
            "to_user_id": "SL.1838476520903277",
            "from": "86178****8556",
            "id": "wamid.HBgTU0wuMTgzODQ3NjUyMDkwMzI3NxUUABEYFDJBMzREQkI3NDREMDVBQTM3QTM3AA==",
            "text": {
                "previewUrl": true,
                "body": "Have you ever imported phone accessories from China before?",
                "type": "text"
            },
            "to": "2327***13292",
            "type": "text",
            "timestamp": 1793606952000
        },
        "wamid": "wamid.BgNODYxN...",
        "conversationId": "12312312312312",
        "uid": "123123123123123213123",
        "sendTime": "2026-07-09T09:11:23.405Z",
        "sendTimestamp": "1783588283405"
    }
}
```

**chat\_mo\_message\_notify 示例**

```json
{
    "id": "b5e984b3-21b2-42a9-b08b-72e5a4096ac6",
    "type": "chat_mo_message_notify",
    "eventTime": "2023-02-22T12:00:00.000Z",
    "body": {
        "wabaId": "WHATSAPP_BUSINESS_ACCOUNT_ID",
        "from": "wamid.BgNODYxN...",
        "id": "9bbd248f7e8049cb8e680a589ad71231",
        "to": "PHONE-NUMBER",
        "messageType": "text",
        "assignee": {
            "assigneeType": 0,
            "userEmail": "innopaas@253.com",
            "userId": "2040160",
            "userName": "innopaas"
        },
        "context": {
            "from": "923****04081",
            "id": "wamid.HBgMOTIzMDY0NjA0MDgxFQIAEhggQUM0QjY3NzM3RkE1MkRCNERBODYwQjQ5NEIzMDRDNTAA",
            "text": {
                "previewUrl": true,
                "body": "Hi",
                "type": "text"
            },
            "type": "text",
            "from_user_id": "PK.2084349368861389",
            "timestamp": 1793607152000
        },
        "wamid": "wamid.BgNODYxN...",
        "conversationId": "12312312312312",
        "uid": "123123123123123213123",
        "sendTime": "2026-07-09T09:11:23.405Z",
        "sendTimestamp": "1783588283405"
    }
}
```
