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

# Groups

> Receive and identify WhatsApp group messages on the whatsapp_alt channel — no new event type, just extra fields on message.inbound.

WhatsApp Alternative delivers **group** messages through the same `message.inbound` webhook as one-to-one messages. There is no separate event type to subscribe to — a group message simply carries extra group fields on `data`, so your existing handler keeps working and you branch on `isGroup`.

## How a group message arrives

The conversation is keyed on the **group**, while `from` is the **participant** who actually sent the message.

```json message.inbound (group) theme={null}
{
  "id": "evt_1736850000000_abc123",
  "type": "message.inbound",
  "timestamp": 1736850000000,
  "senderId": "sender_12345",
  "projectId": "proj_abc",
  "data": {
    "messageId": "jx77...",
    "channel": "whatsapp_alt",
    "from": "+14155551234",
    "to": "+13125551212",
    "messageType": "text",
    "text": "Anyone free at 3pm?",
    "status": "delivered",
    "isGroup": true,
    "groupId": "120363000000000000@g.us",
    "groupAuthor": "+14155551234",
    "groupName": "Weekend Trip",
    "providerTimestamp": 1736849999000
  }
}
```

### Group fields on `data`

| Field               | Present     | Description                                                            |
| ------------------- | ----------- | ---------------------------------------------------------------------- |
| `isGroup`           | groups only | `true` for a group message. Absent/falsy for a one-to-one message.     |
| `groupId`           | groups only | The group's JID (`<id>@g.us`). This is the conversation key.           |
| `groupAuthor`       | groups only | The participant who sent the message, in E.164. Same value as `from`.  |
| `groupName`         | when known  | The group's display name (subject).                                    |
| `from`              | always      | The message sender — the participant in a group, the contact in a 1:1. |
| `to`                | always      | Your linked number.                                                    |
| `providerTimestamp` | when known  | When WhatsApp originally received the message (Unix ms).               |

## Telling a group message from a one-to-one

Branch on `isGroup`:

<CodeGroup>
  ```typescript TypeScript theme={null}
  app.post("/webhooks/zavu", (req, res) => {
    const { type, data } = req.body;
    if (type === "message.inbound" && data.channel === "whatsapp_alt") {
      if (data.isGroup) {
        // Group message: attribute to the participant, thread on the group.
        console.log(`[${data.groupName ?? data.groupId}] ${data.groupAuthor}: ${data.text}`);
      } else {
        // One-to-one message.
        console.log(`${data.from}: ${data.text}`);
      }
    }
    res.sendStatus(200);
  });
  ```

  ```python Python theme={null}
  @app.post("/webhooks/zavu")
  async def zavu_webhook(payload: dict):
      if payload["type"] == "message.inbound" and payload["data"].get("channel") == "whatsapp_alt":
          data = payload["data"]
          if data.get("isGroup"):
              label = data.get("groupName") or data["groupId"]
              print(f"[{label}] {data['groupAuthor']}: {data.get('text')}")
          else:
              print(f"{data['from']}: {data.get('text')}")
      return {"ok": True}
  ```
</CodeGroup>

<Note>
  Group messages count toward inbound only — like every channel, inbound messages are not billed against your plan quota. The group thread lives alongside your 1:1 conversations, keyed on `groupId`.
</Note>

## What Zavu ignores

To keep the inbox clean, some non-conversational threads are never delivered as inbound (`message.inbound`) events:

* **Status updates / stories** (`status@broadcast`) — not an inbound message. They are delivered separately as opt-in [`message.status`](/guides/whatsapp-alt/stories) events, never in the inbox.
* **Newsletters / channels** — not a two-way conversation.
* **Self-chat** (messages to your own number).

<Note>
  Group membership-change events (joins, removals, subject changes) are not emitted today. Contact Zavu if you need them.
</Note>

## Next steps

<CardGroup cols={2}>
  <Card title="Sending & Receiving" icon="messages" href="/guides/whatsapp-alt/sending-receiving">
    The base send/receive flow on the `whatsapp_alt` channel.
  </Card>

  <Card title="Receiving Messages" icon="inbox" href="/guides/receiving-messages/webhooks">
    Configure and verify your sender webhook.
  </Card>
</CardGroup>
