Creating a Group
You can create a new WhatsApp group by providing a name (subject) and a list of participant JIDs.Method Signature
subject- The name of the groupparticipants- Array of participant JIDs in the format[country code][phone number]@s.whatsapp.net
GroupMetadata object containing the group’s ID and other metadata
You must include at least one participant when creating a group. Group IDs are in the format
[email protected].Updating Group Subject
Change the group’s name (subject) using thegroupUpdateSubject method.
Method Signature
jid- The group JIDsubject- The new group name
Updating Group Description
Update or remove the group’s description.Method Signature
jid- The group JIDdescription- The new description text, orundefinedto remove it
The method automatically handles description versioning by retrieving the current description ID before updating.
Leaving a Group
You can leave a group using thegroupLeave method.
Method Signature
id- The group JID
Best Practices
Verify admin status
Before attempting to modify group properties, ensure you have admin privileges using
groupMetadata to check your participant status.Handle errors gracefully
Wrap group operations in try-catch blocks, as they will throw errors if you lack permissions or if the operation fails.
Cache group metadata
Implement group metadata caching to reduce API calls. See the Settings & Metadata page for details.