Groups Client API
Generated client method reference for the groups namespace.

Groups Client API
Generated file warning: this page is generated by
packages/schema/scripts/gen-client-reference-docs.ts. Do not edit generated method content by hand.
This page documents 22 schema-registry client methods in the groups namespace.
addParticipant
Add participant to group
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, contactId |
| Aliases | addGroupParticipant, groups.addParticipant |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/addParticipant | addParticipant | Active |
| Alias | PUT | /api/addGroupParticipant | addGroupParticipant | Active |
| Alias | PUT | /api/addParticipant | addParticipant | Active |
Usage
const result = await client.addParticipant({
groupId: "447123456789-1445627445@g.us",
contactId: "447123456789@c.us",
});
// namespaced form: client.groups.addParticipant(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | boolean |
approveGroupJoinRequest
Approve group join request
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, contactId |
| Aliases | groups.approveJoinRequest |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/approveJoinRequest | approveGroupJoinRequest | Active |
| Alias | PUT | /api/approveGroupJoinRequest | approveGroupJoinRequest | Active |
Usage
const result = await client.approveGroupJoinRequest({
groupId: "447123456789-1445627445@g.us",
contactId: "447123456789@c.us",
});
// namespaced form: client.groups.approveJoinRequest(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | string | boolean |
createGroupRestricted
Create new group
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | send |
| Functionality | both |
| Positional parameter order | name, contacts |
| Aliases | groups.create |
| Deprecated aliases | - |
| License | restricted |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/groups/create | createGroup | Active |
| Alias | POST | /api/createGroup | createGroup | Active |
Usage
const result = await client.createGroup({
name: "name",
contacts: "447123456789@c.us",
});
// namespaced form: client.groups.create(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | any |
Returns raw, unstructured data from WhatsApp Web. Narrow or validate the shape before relying on specific fields.
demoteParticipant
Demote participant from admin
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, contactId |
| Aliases | demoteGroupParticipant, groups.demoteParticipant |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/demoteParticipant | demoteParticipant | Active |
| Alias | PUT | /api/demoteGroupParticipant | demoteGroupParticipant | Active |
| Alias | PUT | /api/demoteParticipant | demoteParticipant | Active |
Usage
const result = await client.demoteParticipant({
groupId: "447123456789-1445627445@g.us",
contactId: "447123456789@c.us",
});
// namespaced form: client.groups.demoteParticipant(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | boolean | string |
getAllGroups
Get all groups
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | read |
| Functionality | both |
| Positional parameter order | withNewMessagesOnly |
| Aliases | groups.all, groups.getAll, groups.list, listGroups |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/groups/getAll | getAllGroups | Active |
| Alias | GET | /api/getAllGroups | getAllGroups | Active |
| Alias | GET | /api/groups/all | groups.all | Active |
| Alias | GET | /api/groups/list | groups.list | Active |
| Alias | GET | /api/listGroups | listGroups | Active |
Usage
const result = await client.getAllGroups({
withNewMessagesOnly: false,
});
// namespaced form: client.groups.getAll(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | any[] |
Returns raw, unstructured data from WhatsApp Web. Narrow or validate the shape before relying on specific fields.
getGroupAdmins
Get group admins
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | read |
| Functionality | both |
| Positional parameter order | groupId |
| Aliases | groups.getAdmins |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/groups/getAdmins | getGroupAdmins | Active |
| Alias | GET | /api/getGroupAdmins | getGroupAdmins | Active |
Usage
const result = await client.getGroupAdmins({
groupId: "447123456789-1445627445@g.us",
});
// namespaced form: client.groups.getAdmins(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | any[] |
Returns raw, unstructured data from WhatsApp Web. Narrow or validate the shape before relying on specific fields.
getGroupInfo
Get group metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | read |
| Functionality | both |
| Positional parameter order | groupId |
| Aliases | groups.getInfo |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/groups/getInfo | getGroupInfo | Active |
| Alias | GET | /api/getGroupInfo | getGroupInfo | Active |
Usage
const result = await client.getGroupInfo({
groupId: "447123456789-1445627445@g.us",
});
// namespaced form: client.groups.getInfo(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | any |
Returns raw, unstructured data from WhatsApp Web. Narrow or validate the shape before relying on specific fields.
getGroupInviteLink
Get group invite link
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | read |
| Functionality | both |
| Positional parameter order | groupId |
| Aliases | groups.getInviteLink |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/groups/getInviteLink | getGroupInviteLink | Active |
| Alias | GET | /api/getGroupInviteLink | getGroupInviteLink | Active |
Usage
const result = await client.getGroupInviteLink({
groupId: "447123456789-1445627445@g.us",
});
// namespaced form: client.groups.getInviteLink(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | string |
getGroupMembers
Retrieves members of a group
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | read |
| Functionality | both |
| Positional parameter order | groupId |
| Aliases | groups.getMembers |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/groups/getMembers | getGroupMembers | Active |
| Alias | GET | /api/getGroupMembers | getGroupMembers | Active |
Usage
const result = await client.getGroupMembers({
groupId: "447123456789-1445627445@g.us",
});
// namespaced form: client.groups.getMembers(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | any[] |
Returns raw, unstructured data from WhatsApp Web. Narrow or validate the shape before relying on specific fields.
getGroupMembersId
Get group member IDs
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | read |
| Functionality | both |
| Positional parameter order | groupId |
| Aliases | getGroupMemberIds, groups.getMemberIds, groups.getMembersId |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/groups/getMemberIds | getGroupMembersId | Active |
| Alias | GET | /api/getGroupMemberIds | getGroupMemberIds | Active |
| Alias | GET | /api/getGroupMembersId | getGroupMembersId | Active |
| Alias | GET | /api/groups/getMembersId | groups.getMembersId | Active |
Usage
const result = await client.getGroupMembersId({
groupId: "447123456789-1445627445@g.us",
});
// namespaced form: client.groups.getMemberIds(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | string[] |
getKickedGroups
Get groups where kicked
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | read |
| Functionality | both |
| Positional parameter order | - |
| Aliases | groups.getKicked |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/groups/getKicked | getKickedGroups | Active |
| Alias | GET | /api/getKickedGroups | getKickedGroups | Active |
Usage
const result = await client.getKickedGroups({});
// namespaced form: client.groups.getKicked(...)Parameters
This method does not define input parameters.
Output
| Prop | Value |
|---|---|
| Return type | string[] |
joinGroupViaLinkRestricted
Join group via invite link
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | send |
| Functionality | both |
| Positional parameter order | link, returnChatObj |
| Aliases | groups.join, groups.joinViaLink, joinGroup |
| Deprecated aliases | - |
| License | restricted |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/groups/join | joinGroupViaLink | Active |
| Alias | POST | /api/groups/joinViaLink | groups.joinViaLink | Active |
| Alias | POST | /api/joinGroup | joinGroup | Active |
| Alias | POST | /api/joinGroupViaLink | joinGroupViaLink | Active |
Usage
const result = await client.joinGroupViaLink({
link: "link",
returnChatObj: true,
});
// namespaced form: client.groups.join(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | any |
Returns raw, unstructured data from WhatsApp Web. Narrow or validate the shape before relying on specific fields.
leaveGroup
Leave a group
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId |
| Aliases | groups.leave |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/leave | leaveGroup | Active |
| Alias | PUT | /api/leaveGroup | leaveGroup | Active |
Usage
const result = await client.leaveGroup({
groupId: "447123456789-1445627445@g.us",
});
// namespaced form: client.groups.leave(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | any |
Returns raw, unstructured data from WhatsApp Web. Narrow or validate the shape before relying on specific fields.
promoteParticipant
Promote participant to admin
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, contactId |
| Aliases | groups.promoteParticipant, promoteGroupParticipant |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/promoteParticipant | promoteParticipant | Active |
| Alias | PUT | /api/promoteGroupParticipant | promoteGroupParticipant | Active |
| Alias | PUT | /api/promoteParticipant | promoteParticipant | Active |
Usage
const result = await client.promoteParticipant({
groupId: "447123456789-1445627445@g.us",
contactId: "447123456789@c.us",
});
// namespaced form: client.groups.promoteParticipant(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | boolean | string |
rejectGroupJoinRequest
Reject group join request
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, contactId |
| Aliases | groups.rejectJoinRequest |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/rejectJoinRequest | rejectGroupJoinRequest | Active |
| Alias | PUT | /api/rejectGroupJoinRequest | rejectGroupJoinRequest | Active |
Usage
const result = await client.rejectGroupJoinRequest({
groupId: "447123456789-1445627445@g.us",
contactId: "447123456789@c.us",
});
// namespaced form: client.groups.rejectJoinRequest(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | string | boolean |
removeParticipant
Remove participant from group
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, contactId |
| Aliases | groups.removeParticipant, removeGroupParticipant |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/removeParticipant | removeParticipant | Active |
| Alias | PUT | /api/removeGroupParticipant | removeGroupParticipant | Active |
| Alias | PUT | /api/removeParticipant | removeParticipant | Active |
Usage
const result = await client.removeParticipant({
groupId: "447123456789-1445627445@g.us",
contactId: "447123456789@c.us",
});
// namespaced form: client.groups.removeParticipant(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | boolean |
revokeGroupInviteLink
Revoke group invite link
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId |
| Aliases | groups.revokeInviteLink |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/revokeInviteLink | revokeGroupInviteLink | Active |
| Alias | PUT | /api/revokeGroupInviteLink | revokeGroupInviteLink | Active |
Usage
const result = await client.revokeGroupInviteLink({
groupId: "447123456789-1445627445@g.us",
});
// namespaced form: client.groups.revokeInviteLink(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | string | boolean |
setGroupDescription
Set group description
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, description |
| Aliases | groups.setDescription |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/setDescription | setGroupDescription | Active |
| Alias | PUT | /api/setGroupDescription | setGroupDescription | Active |
Usage
const result = await client.setGroupDescription({
groupId: "447123456789-1445627445@g.us",
description: "description",
});
// namespaced form: client.groups.setDescription(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | boolean |
setGroupEditToAdminsOnly
Restrict group editing to admins only
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, onlyAdmins |
| Aliases | groups.setEditAdminsOnly, groups.setEditToAdminsOnly |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/setEditAdminsOnly | setGroupEditToAdminsOnly | Active |
| Alias | PUT | /api/groups/setEditToAdminsOnly | groups.setEditToAdminsOnly | Active |
| Alias | PUT | /api/setGroupEditToAdminsOnly | setGroupEditToAdminsOnly | Active |
Usage
const result = await client.setGroupEditToAdminsOnly({
groupId: "447123456789-1445627445@g.us",
onlyAdmins: true,
});
// namespaced form: client.groups.setEditAdminsOnly(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | boolean |
setGroupIcon
Set group icon
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, image |
| Aliases | groups.setIcon |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/setIcon | setGroupIcon | Active |
| Alias | PUT | /api/setGroupIcon | setGroupIcon | Active |
Usage
const result = await client.setGroupIcon({
groupId: "447123456789-1445627445@g.us",
image: "image",
});
// namespaced form: client.groups.setIcon(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | boolean |
setGroupTitle
Set group title
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, title |
| Aliases | groups.setTitle |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/setTitle | setGroupTitle | Active |
| Alias | PUT | /api/setGroupTitle | setGroupTitle | Active |
Usage
const result = await client.setGroupTitle({
groupId: "447123456789-1445627445@g.us",
title: "title",
});
// namespaced form: client.groups.setTitle(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | boolean |
setGroupToAdminsOnly
Restrict group to admins only
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, onlyAdmins |
| Aliases | groups.setAdminsOnly, groups.setToAdminsOnly |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/setAdminsOnly | setGroupToAdminsOnly | Active |
| Alias | PUT | /api/groups/setToAdminsOnly | groups.setToAdminsOnly | Active |
| Alias | PUT | /api/setGroupToAdminsOnly | setGroupToAdminsOnly | Active |
Usage
const result = await client.setGroupToAdminsOnly({
groupId: "447123456789-1445627445@g.us",
onlyAdmins: true,
});
// namespaced form: client.groups.setAdminsOnly(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | boolean |

Was this helpful?
Wally and his cute companion coffee mug are coding day and night to keep this up-to-date!
