> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ycloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# whatsapp.group.message.updated

> 当群组发送的整体结果或某个接收成员的状态更新时触发。

在您的 Webhook 端点使用 `whatsapp.group.message.updated`。

## 触发条件

当整体群发结果或单个接收成员的状态更新时触发。

当你[配置 Webhook 端点](https://docs.ycloud.com/zh/api-reference/guides/api-fundamentals/configure-webhooks.md)时，请显式订阅。

使用 `statusScope` 解读所报告的状态。`group` 描述整体发送结果。`member` 描述单个收件人。一旦某个成员已送达或已读，YCloud 会忽略该成员后续的 `failed` 或 `expired` 状态，并跳过相应通知。按外层事件 `id` 对 Webhook 投递进行去重。

成员 `to` 是 E.164 电话号码；仅含 BSUID 的回执会省略该字段，并可能包含 `recipientUserId`。定价字段为扁平结构。仅当成员费用已确认时，`totalPrice` 和 `currency` 才会同时出现；它们缺失并不表示数值为零。不会返回群组总计。状态通知先于成员计费，不会等待扣费，也不会触发额外的费用事件。

有关订阅状态变更和重试规则，请参阅 [群组消息处理](https://docs.ycloud.com/zh/api-reference/guides/whatsapp-platform/manage-whatsapp-groups.md#interpret-group-message-webhooks)。
有关请求和确认，请参阅 [成员发送示例](https://docs.ycloud.com/zh/api-reference/guides/examples/webhook-examples/whatsapp-message-updated-webhook-examples#group-member-delivery-status)。

## 语法

YCloud 会向您配置的接收端发送 HTTP `POST`。可选字段取决于可用的消息和回执数据。

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "<EVENT_ID>",
  "type": "whatsapp.group.message.updated",
  "apiVersion": "<API_VERSION>",
  "createTime": "<EVENT_CREATE_TIME>",
  "whatsappGroupMessage": {
    "id": "wam_group_01",
    "wamid": "wamid.1",
    "wabaId": "123456789012345",
    "phoneNumberId": "1234567890123456",
    "groupId": "Y2FwaV9ncm91cDpFWEFNUExFX0dST1VQX0lE",
    "statusScope": "member",
    "status": "delivered",
    "statusTime": "2026-05-13T00:00:00Z",
    "from": "+16315551111",
    "externalId": "order-group-123",
    "createTime": "2026-05-12T23:59:58.000Z",
    "sendTime": "2026-05-12T23:59:59.000Z",
    "deliverTime": "2026-05-13T00:00:00.000Z",
    "regionCode": "US",
    "to": "+16315552222",
    "recipientUserId": "US.1234",
    "customerProfile": {
      "name": "John Doe"
    },
    "pricingModel": "PMP",
    "pricingType": "regular",
    "pricingCategory": "group_marketing"
  }
}
```

## 参数

在处理事件前验证 `YCloud-Signature` 标头。

### 事件信封

| 参数 | 类型 | 必填 | 描述 |
| - | - | - | - |
| `id` | 字符串 | 是 | 用于对投递去重的唯一事件 ID。 |
| `type` | string | 是 | 始终 `whatsapp.group.message.updated`。 |
| `apiVersion` | string | 是 | 用于此事件的 API 版本。 |
| `createTime` | string | 是 | 事件创建时间，采用 RFC 3339 格式。 |

### 事件负载

| 参数 | 类型 | 必填 | 描述 |
| - | - | - | - |
| `whatsappGroupMessage` | 对象 | 是 | 群组消息事件负载。 |

#### whatsappGroupMessage

| 参数 | 类型 | 是否必填 | 描述 |
| - | - | - | - |
| `id` | 字符串 | 是 | 此消息的群组及成员状态事件共用的 YCloud 群组消息 ID。使用外层事件 ID 对 Webhook 投递去重。 |
| `wamid` | string | 是 | Meta 消息 ID。 |
| `wabaId` | string | 是 | WhatsApp 商业账户 ID。 |
| `phoneNumberId` | string | 是 | 发送该消息的业务电话号码的 ID。 |
| `groupId` | string | 是 | 目标群组 ID。 |
| `statusScope` | string | 是 | 此状态的适用范围。group 描述群组消息的整体发送结果；member 描述单个接收成员。群组级别的 sent 状态并不意味着所有成员都已收到该消息。群组级别的事件会省略成员身份和 customerProfile 字段。值：`group`、`member`。 |
| `status` | string | 是 | 此事件报告的状态，需结合 statusScope 解读。这是一条状态通知，而不是每位成员最新状态的快照。取值：`sent`、`delivered`、`read`、`failed`、`expired`。 |
| `from` | string | 否 | 企业发送方电话号码，E.164 格式（带前导 +）。在可用时，适用于群组和成员范围。 |
| `externalId` | string | 否 | 发送请求中提供的 externalId。未提供时省略。 |
| `regionCode` | string | 否 | 来自已保存消息记录的接收方成员的国家或地区代码。仅在成员范围且已知时包含。 |
| `totalPrice` | number | 否 | 该接收方成员的确认价格，而非群组总价。仅在成员范围内且货币可用时一并包含。在计费待处理期间可能缺失；缺失并不表示为零。 |
| `currency` | 字符串 | 否 | totalPrice 的货币（ISO 4217）。仅当范围为 member 时，与 totalPrice 一同返回。 |
| `createTime` | string | 否 | 群组消息的创建时间，采用 RFC 3339 UTC 格式。不同于外层事件的 createTime。 |
| `sendTime` | string | 否 | 已知的消息发送时间，采用 RFC 3339 UTC。不可用时省略。 |
| `deliverTime` | string | 否 | 此收件人成员的已知送达时间，采用 RFC 3339 UTC。仅在成员范围内且可用时包含。 |
| `readTime` | string | 否 | 此接收方成员的已知已读时间，采用 RFC 3339 UTC。仅在成员范围内且可用时包含。 |
| `statusTime` | 字符串 | 否 | 此状态的时间，采用 RFC 3339 UTC 格式。当不可用时省略；该时间与外层事件的 createTime 分开。 |
| `to` | string | 否 | 接收方成员电话号码，采用 E.164 格式（带前导 +），如可用。仅在成员作用域下包含。当回执仅通过业务范围内的用户 ID（BSUID）标识成员时，将省略。 |
| `recipientUserId` | string | 否 | 接收方成员的 Business-scoped user ID (BSUID)（如已知）。仅在成员范围下存在。 |
| `parentRecipientUserId` | string | 否 | 接收方成员的父用户 ID（已知时）。仅在成员范围内出现。 |
| `customerProfile` | 对象 | 否 | 接收方成员资料（如可用）。仅在成员范围内包含。 |
| `pricingModel` | string | 否 | 此状态的定价模型（如可用）。值缺失并不意味着消息免费。 |
| `pricingType` | string | 否 | 此状态的定价类型（如可用）。缺少值并不意味着消息免费。 |
| `pricingCategory` | string | 否 | 消息定价类别（如可用）。Marketing Lite 消息使用 group\_marketing\_lite。可能在缺少 pricingModel 或 pricingType 的情况下存在。使用群组消息检索 API 检查消息费用。取值：`group_marketing`、`group_marketing_lite`、`group_utility`、`group_service`。 |
| `errors` | array | 否 | 与此状态相关的错误（如有）。 |

#### whatsappGroupMessage.customerProfile

| 参数 | 类型 | 必填 | 描述 |
| - | - | - | - |
| `name` | string | 否 | 姓名。 |
| `username` | string | 否 | 用户名。 |

## 示例

以下 ID 和电话号码仅为示例。

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "evt_group_message_123",
  "type": "whatsapp.group.message.updated",
  "apiVersion": "v2",
  "createTime": "2026-05-13T00:00:00.000Z",
  "whatsappGroupMessage": {
    "id": "wam_group_01",
    "wamid": "wamid.1",
    "wabaId": "123456789012345",
    "phoneNumberId": "1234567890123456",
    "groupId": "Y2FwaV9ncm91cDpFWEFNUExFX0dST1VQX0lE",
    "statusScope": "member",
    "status": "delivered",
    "statusTime": "2026-05-13T00:00:00Z",
    "from": "+16315551111",
    "externalId": "order-group-123",
    "createTime": "2026-05-12T23:59:58.000Z",
    "sendTime": "2026-05-12T23:59:59.000Z",
    "deliverTime": "2026-05-13T00:00:00.000Z",
    "regionCode": "US",
    "to": "+16315552222",
    "recipientUserId": "US.1234",
    "customerProfile": {
      "name": "John Doe"
    },
    "pricingModel": "PMP",
    "pricingType": "regular",
    "pricingCategory": "group_marketing"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.