Skip to main content
A common flow: something happens in your system, a group opens for it, the right people join, and the group closes when the case is done.
You run the steps from your own code. Groups give you the building blocks.
Before you start:

The flow

1

A ticket opens: create the group

Create the group and keep the requestId next to your ticket.
The Idempotency-Key protects against network retries. Send the same key again within 24 hours and you get the original answer, not a second group.
2

Wait for the created event

Find the whatsapp.group.updated event whose requestId matches, with change set to created.
Save its groupId on the ticket. If change is create_failed, read error, then create again with a new key, such as ticket-1042-2. The old key would replay the failed attempt.
3

Send the invite 1:1

Send the invite template to each person, with the groupId as the group_id parameter.
People join through the link, so you never add them yourself.
4

Greet people when they join

On member_joined, send a message to the group.
The event’s member tells you who joined.
5

The ticket closes: delete the group

Delete the group. Its members are removed.
The call returns 202 with a requestId. A deleted event with the same requestId and succeeded: true confirms it.

Tips

  • Use approval_required when only some people should join. Approve them on join_requested. See join requests.
  • Events can arrive more than once. Drop duplicates by the event id.
  • Keep the ticket, requestId, and groupId together so you can find the group again when the case closes.
  • A group holds 8 members. Plan for that when you invite.