TokenAccount or TokenInstance on every route. Each call validates the instance ownership.
Communities are WhatsApp “parent groups” that bundle other groups as subgroups. This section covers the /api/community/* routes for creating, linking, unlinking, and listing subgroups. For regular groups, see Groups.
Endpoints
| Method | Path | Function |
|---|---|---|
| POST | /api/community/create/:instance | Create community |
| POST | /api/community/link/:instance | Link groups to community |
| POST | /api/community/unlink/:instance | Unlink groups |
| GET | /api/community/listSubGroups/:instance | List subgroups |
How it works
A WhatsApp community is composed of:- Parent group (the community itself), where you manage everything
- Announcements group, created automatically. Only admins post, but every member of the subgroups receives the messages
- Subgroups, regular groups linked to the community
Each group belongs to at most one community at a time. To move a group from one community to another, unlink first and then link to the destination.
Identifiers
- Most routes expect JIDs
@g.usincommunityJidandgroupJid. GET /listSubGroupsrequires?communityJid=in the query string.
Response shapes
/create response
/link and /unlink response
/listSubGroups response
isDefaultSubGroup=true indicates the community’s default Announcements group.
Error envelope
Next
Create community
Create the parent group and link initial subgroups.
List subgroups
Return the linked groups.