open-wa v5 is alpha. Use v4.76.0 for mature production systems unless you are validating v5.
The Client APIAPI ExplorerLicensing

Groups Client API

Generated client method reference for the groups namespace.

Client Groups Methods Wally

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

PropValue
Namespacegroups
Actionupdate
Functionalityboth
Positional parameter ordergroupId, contactId
AliasesaddGroupParticipant, groups.addParticipant
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPUT/api/groups/addParticipantaddParticipantActive
AliasPUT/api/addGroupParticipantaddGroupParticipantActive
AliasPUT/api/addParticipantaddParticipantActive

Usage

const result = await client.addParticipant({
  groupId: "447123456789-1445627445@g.us",
  contactId: "447123456789@c.us",
});
const result = await client.groups.addParticipant({
  groupId: "447123456789-1445627445@g.us",
  contactId: "447123456789@c.us",
});
curl -X PUT "http://localhost:8080/api/groups/addParticipant" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "groupId": "447123456789-1445627445@g.us",
    "contactId": "447123456789@c.us"
  }'

Parameters

Prop

Type

Output

PropValue
Return typeboolean

approveGroupJoinRequest

Approve group join request

Overview

PropValue
Namespacegroups
Actionupdate
Functionalityboth
Positional parameter ordergroupId, contactId
Aliasesgroups.approveJoinRequest
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPUT/api/groups/approveJoinRequestapproveGroupJoinRequestActive
AliasPUT/api/approveGroupJoinRequestapproveGroupJoinRequestActive

Usage

const result = await client.approveGroupJoinRequest({
  groupId: "447123456789-1445627445@g.us",
  contactId: "447123456789@c.us",
});
const result = await client.groups.approveJoinRequest({
  groupId: "447123456789-1445627445@g.us",
  contactId: "447123456789@c.us",
});
curl -X PUT "http://localhost:8080/api/groups/approveJoinRequest" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "groupId": "447123456789-1445627445@g.us",
    "contactId": "447123456789@c.us"
  }'

Parameters

Prop

Type

Output

PropValue
Return typestring | boolean

createGroupRestricted

Create new group

Overview

PropValue
Namespacegroups
Actionsend
Functionalityboth
Positional parameter ordername, contacts
Aliasesgroups.create
Deprecated aliases-
Licenserestricted
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPOST/api/groups/createcreateGroupActive
AliasPOST/api/createGroupcreateGroupActive

Usage

const result = await client.createGroup({
  name: "name",
  contacts: "447123456789@c.us",
});
const result = await client.groups.create({
  name: "name",
  contacts: "447123456789@c.us",
});
curl -X POST "http://localhost:8080/api/groups/create" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "name": "name",
    "contacts": "447123456789@c.us"
  }'

Parameters

Prop

Type

Output

PropValue
Return typeunknown

demoteParticipant

Demote participant from admin

Overview

PropValue
Namespacegroups
Actionupdate
Functionalityboth
Positional parameter ordergroupId, contactId
AliasesdemoteGroupParticipant, groups.demoteParticipant
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPUT/api/groups/demoteParticipantdemoteParticipantActive
AliasPUT/api/demoteGroupParticipantdemoteGroupParticipantActive
AliasPUT/api/demoteParticipantdemoteParticipantActive

Usage

const result = await client.demoteParticipant({
  groupId: "447123456789-1445627445@g.us",
  contactId: "447123456789@c.us",
});
const result = await client.groups.demoteParticipant({
  groupId: "447123456789-1445627445@g.us",
  contactId: "447123456789@c.us",
});
curl -X PUT "http://localhost:8080/api/groups/demoteParticipant" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "groupId": "447123456789-1445627445@g.us",
    "contactId": "447123456789@c.us"
  }'

Parameters

Prop

Type

Output

PropValue
Return typeboolean | string

getAllGroups

Get all groups

Overview

PropValue
Namespacegroups
Actionread
Functionalityboth
Positional parameter orderwithNewMessagesOnly
Aliasesgroups.all, groups.getAll, groups.list, listGroups
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/groups/getAllgetAllGroupsActive
AliasGET/api/getAllGroupsgetAllGroupsActive
AliasGET/api/groups/allgroups.allActive
AliasGET/api/groups/listgroups.listActive
AliasGET/api/listGroupslistGroupsActive

Usage

const result = await client.getAllGroups({
  withNewMessagesOnly: false,
});
const result = await client.groups.getAll({
  withNewMessagesOnly: false,
});
curl -G "http://localhost:8080/api/groups/getAll" \
  -H "x-api-key: YOUR_API_KEY" \
  --data-urlencode "withNewMessagesOnly=false"

Parameters

Prop

Type

Output

PropValue
Return typeunknown[]

getGroupAdmins

Get group admins

Overview

PropValue
Namespacegroups
Actionread
Functionalityboth
Positional parameter ordergroupId
Aliasesgroups.getAdmins
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/groups/getAdminsgetGroupAdminsActive
AliasGET/api/getGroupAdminsgetGroupAdminsActive

Usage

const result = await client.getGroupAdmins({
  groupId: "447123456789-1445627445@g.us",
});
const result = await client.groups.getAdmins({
  groupId: "447123456789-1445627445@g.us",
});
curl -G "http://localhost:8080/api/groups/getAdmins" \
  -H "x-api-key: YOUR_API_KEY" \
  --data-urlencode "groupId=447123456789-1445627445@g.us"

Parameters

Prop

Type

Output

PropValue
Return typeunknown[]

getGroupInfo

Get group metadata

Overview

PropValue
Namespacegroups
Actionread
Functionalityboth
Positional parameter ordergroupId
Aliasesgroups.getInfo
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/groups/getInfogetGroupInfoActive
AliasGET/api/getGroupInfogetGroupInfoActive

Usage

const result = await client.getGroupInfo({
  groupId: "447123456789-1445627445@g.us",
});
const result = await client.groups.getInfo({
  groupId: "447123456789-1445627445@g.us",
});
curl -G "http://localhost:8080/api/groups/getInfo" \
  -H "x-api-key: YOUR_API_KEY" \
  --data-urlencode "groupId=447123456789-1445627445@g.us"

Parameters

Prop

Type

Output

PropValue
Return typeunknown

Get group invite link

Overview

PropValue
Namespacegroups
Actionread
Functionalityboth
Positional parameter ordergroupId
Aliasesgroups.getInviteLink
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/groups/getInviteLinkgetGroupInviteLinkActive
AliasGET/api/getGroupInviteLinkgetGroupInviteLinkActive

Usage

const result = await client.getGroupInviteLink({
  groupId: "447123456789-1445627445@g.us",
});
const result = await client.groups.getInviteLink({
  groupId: "447123456789-1445627445@g.us",
});
curl -G "http://localhost:8080/api/groups/getInviteLink" \
  -H "x-api-key: YOUR_API_KEY" \
  --data-urlencode "groupId=447123456789-1445627445@g.us"

Parameters

Prop

Type

Output

PropValue
Return typestring

getGroupMembers

Retrieves members of a group

Overview

PropValue
Namespacegroups
Actionread
Functionalityboth
Positional parameter ordergroupId
Aliasesgroups.getMembers
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/groups/getMembersgetGroupMembersActive
AliasGET/api/getGroupMembersgetGroupMembersActive

Usage

const result = await client.getGroupMembers({
  groupId: "447123456789-1445627445@g.us",
});
const result = await client.groups.getMembers({
  groupId: "447123456789-1445627445@g.us",
});
curl -G "http://localhost:8080/api/groups/getMembers" \
  -H "x-api-key: YOUR_API_KEY" \
  --data-urlencode "groupId=447123456789-1445627445@g.us"

Parameters

Prop

Type

Output

PropValue
Return typeunknown[]

getGroupMembersId

Get group member IDs

Overview

PropValue
Namespacegroups
Actionread
Functionalityboth
Positional parameter ordergroupId
AliasesgetGroupMemberIds, groups.getMemberIds, groups.getMembersId
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/groups/getMemberIdsgetGroupMembersIdActive
AliasGET/api/getGroupMemberIdsgetGroupMemberIdsActive
AliasGET/api/getGroupMembersIdgetGroupMembersIdActive
AliasGET/api/groups/getMembersIdgroups.getMembersIdActive

Usage

const result = await client.getGroupMembersId({
  groupId: "447123456789-1445627445@g.us",
});
const result = await client.groups.getMemberIds({
  groupId: "447123456789-1445627445@g.us",
});
curl -G "http://localhost:8080/api/groups/getMemberIds" \
  -H "x-api-key: YOUR_API_KEY" \
  --data-urlencode "groupId=447123456789-1445627445@g.us"

Parameters

Prop

Type

Output

PropValue
Return typestring[]

getKickedGroups

Get groups where kicked

Overview

PropValue
Namespacegroups
Actionread
Functionalityboth
Positional parameter order-
Aliasesgroups.getKicked
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/groups/getKickedgetKickedGroupsActive
AliasGET/api/getKickedGroupsgetKickedGroupsActive

Usage

const result = await client.getKickedGroups({});
const result = await client.groups.getKicked({});
curl -X GET "http://localhost:8080/api/groups/getKicked" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{}'

Parameters

This method does not define input parameters.

Output

PropValue
Return typestring[]

Join group via invite link

Overview

PropValue
Namespacegroups
Actionsend
Functionalityboth
Positional parameter orderlink, returnChatObj
Aliasesgroups.join, groups.joinViaLink, joinGroup
Deprecated aliases-
Licenserestricted
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPOST/api/groups/joinjoinGroupViaLinkActive
AliasPOST/api/groups/joinViaLinkgroups.joinViaLinkActive
AliasPOST/api/joinGroupjoinGroupActive
AliasPOST/api/joinGroupViaLinkjoinGroupViaLinkActive

Usage

const result = await client.joinGroupViaLink({
  link: "link",
  returnChatObj: true,
});
const result = await client.groups.join({
  link: "link",
  returnChatObj: true,
});
curl -X POST "http://localhost:8080/api/groups/join" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "link": "link",
    "returnChatObj": true
  }'

Parameters

Prop

Type

Output

PropValue
Return typestring | boolean | number | unknown

leaveGroup

Leave a group

Overview

PropValue
Namespacegroups
Actionupdate
Functionalityboth
Positional parameter ordergroupId
Aliasesgroups.leave
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPUT/api/groups/leaveleaveGroupActive
AliasPUT/api/leaveGroupleaveGroupActive

Usage

const result = await client.leaveGroup({
  groupId: "447123456789-1445627445@g.us",
});
const result = await client.groups.leave({
  groupId: "447123456789-1445627445@g.us",
});
curl -X PUT "http://localhost:8080/api/groups/leave" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "groupId": "447123456789-1445627445@g.us"
  }'

Parameters

Prop

Type

Output

PropValue
Return typeunknown

promoteParticipant

Promote participant to admin

Overview

PropValue
Namespacegroups
Actionupdate
Functionalityboth
Positional parameter ordergroupId, contactId
Aliasesgroups.promoteParticipant, promoteGroupParticipant
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPUT/api/groups/promoteParticipantpromoteParticipantActive
AliasPUT/api/promoteGroupParticipantpromoteGroupParticipantActive
AliasPUT/api/promoteParticipantpromoteParticipantActive

Usage

const result = await client.promoteParticipant({
  groupId: "447123456789-1445627445@g.us",
  contactId: "447123456789@c.us",
});
const result = await client.groups.promoteParticipant({
  groupId: "447123456789-1445627445@g.us",
  contactId: "447123456789@c.us",
});
curl -X PUT "http://localhost:8080/api/groups/promoteParticipant" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "groupId": "447123456789-1445627445@g.us",
    "contactId": "447123456789@c.us"
  }'

Parameters

Prop

Type

Output

PropValue
Return typeboolean | string

rejectGroupJoinRequest

Reject group join request

Overview

PropValue
Namespacegroups
Actionupdate
Functionalityboth
Positional parameter ordergroupId, contactId
Aliasesgroups.rejectJoinRequest
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPUT/api/groups/rejectJoinRequestrejectGroupJoinRequestActive
AliasPUT/api/rejectGroupJoinRequestrejectGroupJoinRequestActive

Usage

const result = await client.rejectGroupJoinRequest({
  groupId: "447123456789-1445627445@g.us",
  contactId: "447123456789@c.us",
});
const result = await client.groups.rejectJoinRequest({
  groupId: "447123456789-1445627445@g.us",
  contactId: "447123456789@c.us",
});
curl -X PUT "http://localhost:8080/api/groups/rejectJoinRequest" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "groupId": "447123456789-1445627445@g.us",
    "contactId": "447123456789@c.us"
  }'

Parameters

Prop

Type

Output

PropValue
Return typestring | boolean

removeParticipant

Remove participant from group

Overview

PropValue
Namespacegroups
Actionupdate
Functionalityboth
Positional parameter ordergroupId, contactId
Aliasesgroups.removeParticipant, removeGroupParticipant
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPUT/api/groups/removeParticipantremoveParticipantActive
AliasPUT/api/removeGroupParticipantremoveGroupParticipantActive
AliasPUT/api/removeParticipantremoveParticipantActive

Usage

const result = await client.removeParticipant({
  groupId: "447123456789-1445627445@g.us",
  contactId: "447123456789@c.us",
});
const result = await client.groups.removeParticipant({
  groupId: "447123456789-1445627445@g.us",
  contactId: "447123456789@c.us",
});
curl -X PUT "http://localhost:8080/api/groups/removeParticipant" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "groupId": "447123456789-1445627445@g.us",
    "contactId": "447123456789@c.us"
  }'

Parameters

Prop

Type

Output

PropValue
Return typeboolean

Revoke group invite link

Overview

PropValue
Namespacegroups
Actionupdate
Functionalityboth
Positional parameter ordergroupId
Aliasesgroups.revokeInviteLink
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPUT/api/groups/revokeInviteLinkrevokeGroupInviteLinkActive
AliasPUT/api/revokeGroupInviteLinkrevokeGroupInviteLinkActive

Usage

const result = await client.revokeGroupInviteLink({
  groupId: "447123456789-1445627445@g.us",
});
const result = await client.groups.revokeInviteLink({
  groupId: "447123456789-1445627445@g.us",
});
curl -X PUT "http://localhost:8080/api/groups/revokeInviteLink" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "groupId": "447123456789-1445627445@g.us"
  }'

Parameters

Prop

Type

Output

PropValue
Return typestring | boolean

setGroupDescription

Set group description

Overview

PropValue
Namespacegroups
Actionupdate
Functionalityboth
Positional parameter ordergroupId, description
Aliasesgroups.setDescription
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPUT/api/groups/setDescriptionsetGroupDescriptionActive
AliasPUT/api/setGroupDescriptionsetGroupDescriptionActive

Usage

const result = await client.setGroupDescription({
  groupId: "447123456789-1445627445@g.us",
  description: "description",
});
const result = await client.groups.setDescription({
  groupId: "447123456789-1445627445@g.us",
  description: "description",
});
curl -X PUT "http://localhost:8080/api/groups/setDescription" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "groupId": "447123456789-1445627445@g.us",
    "description": "description"
  }'

Parameters

Prop

Type

Output

PropValue
Return typeboolean

setGroupEditToAdminsOnly

Restrict group editing to admins only

Overview

PropValue
Namespacegroups
Actionupdate
Functionalityboth
Positional parameter ordergroupId, onlyAdmins
Aliasesgroups.setEditAdminsOnly, groups.setEditToAdminsOnly
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPUT/api/groups/setEditAdminsOnlysetGroupEditToAdminsOnlyActive
AliasPUT/api/groups/setEditToAdminsOnlygroups.setEditToAdminsOnlyActive
AliasPUT/api/setGroupEditToAdminsOnlysetGroupEditToAdminsOnlyActive

Usage

const result = await client.setGroupEditToAdminsOnly({
  groupId: "447123456789-1445627445@g.us",
  onlyAdmins: true,
});
const result = await client.groups.setEditAdminsOnly({
  groupId: "447123456789-1445627445@g.us",
  onlyAdmins: true,
});
curl -X PUT "http://localhost:8080/api/groups/setEditAdminsOnly" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "groupId": "447123456789-1445627445@g.us",
    "onlyAdmins": true
  }'

Parameters

Prop

Type

Output

PropValue
Return typeboolean

setGroupIcon

Set group icon

Overview

PropValue
Namespacegroups
Actionupdate
Functionalityboth
Positional parameter ordergroupId, image
Aliasesgroups.setIcon
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPUT/api/groups/setIconsetGroupIconActive
AliasPUT/api/setGroupIconsetGroupIconActive

Usage

const result = await client.setGroupIcon({
  groupId: "447123456789-1445627445@g.us",
  image: "image",
});
const result = await client.groups.setIcon({
  groupId: "447123456789-1445627445@g.us",
  image: "image",
});
curl -X PUT "http://localhost:8080/api/groups/setIcon" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "groupId": "447123456789-1445627445@g.us",
    "image": "image"
  }'

Parameters

Prop

Type

Output

PropValue
Return typeboolean

setGroupTitle

Set group title

Overview

PropValue
Namespacegroups
Actionupdate
Functionalityboth
Positional parameter ordergroupId, title
Aliasesgroups.setTitle
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPUT/api/groups/setTitlesetGroupTitleActive
AliasPUT/api/setGroupTitlesetGroupTitleActive

Usage

const result = await client.setGroupTitle({
  groupId: "447123456789-1445627445@g.us",
  title: "title",
});
const result = await client.groups.setTitle({
  groupId: "447123456789-1445627445@g.us",
  title: "title",
});
curl -X PUT "http://localhost:8080/api/groups/setTitle" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "groupId": "447123456789-1445627445@g.us",
    "title": "title"
  }'

Parameters

Prop

Type

Output

PropValue
Return typeboolean

setGroupToAdminsOnly

Restrict group to admins only

Overview

PropValue
Namespacegroups
Actionupdate
Functionalityboth
Positional parameter ordergroupId, onlyAdmins
Aliasesgroups.setAdminsOnly, groups.setToAdminsOnly
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPUT/api/groups/setAdminsOnlysetGroupToAdminsOnlyActive
AliasPUT/api/groups/setToAdminsOnlygroups.setToAdminsOnlyActive
AliasPUT/api/setGroupToAdminsOnlysetGroupToAdminsOnlyActive

Usage

const result = await client.setGroupToAdminsOnly({
  groupId: "447123456789-1445627445@g.us",
  onlyAdmins: true,
});
const result = await client.groups.setAdminsOnly({
  groupId: "447123456789-1445627445@g.us",
  onlyAdmins: true,
});
curl -X PUT "http://localhost:8080/api/groups/setAdminsOnly" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "groupId": "447123456789-1445627445@g.us",
    "onlyAdmins": true
  }'

Parameters

Prop

Type

Output

PropValue
Return typeboolean
Wally the Walrus typing

Was this helpful?

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

On this page