Skip to Content
Wazend

Groups

Manage WhatsApp groups with Wazend: create, list, join, add or remove participants, admins, security, picture and more.

Manage WhatsApp groups with the API.

  • {session} — your session name (shown in the Dashboard, for example S0001).
  • {groupId} — group ID in the format 123123123123@g.us.

Info

If you see @lid in the participant list, see the Contacts page.

Create a new group

POST /api/{session}/groups
Body
{
  "name": "Mi grupo",
  "participants": [
    { "id": "5215551234567@c.us" },
    { "id": "5219999999999@c.us" }
  ]
}

Get all groups

GET /api/{session}/groups

The response depends on the engine you use.

Query parameters:

GET /api/{session}/groups?limit=20&offset=0&sortBy=subject&sortOrder=desc
  • limit=10 — limits the number of groups to return.

  • offset=0 — skips N groups from the start.

  • sortBy — sort by field:

    • sortBy=id — by group ID.
    • sortBy=subject — by group subject.
  • sortOrder=desc|asc — order:

    • desc — descending (newest first, A–Z).
    • asc — ascending (oldest first, Z–A).
  • exclude=participants — excludes participant data from the response.

Tip

If you see timeout or the request takes too long, use limit to fetch the objects in smaller chunks.

Warning

If you see the rate-overlimit error with the NOWEB engine, try enabling NOWEB Store.

Get the number of groups

GET /api/{session}/groups/count
Response
{ "count": 10 }

Join a group

If you have the invite link, join using the code or the full URL:

POST /api/{session}/groups/join
Body
{
  "code": "https://chat.whatsapp.com/INVITECODE"
}
Response
{ "id": "5215551234567@g.us" }

Get group invite info

GET /api/{session}/groups/join-info?code=invitecode

Or using the full link (remember to encode the URL):

GET /api/{session}/groups/join-info?code=https%3A%2F%2Fchat.whatsapp.com%2Finvitecode

Refresh groups

POST /api/{session}/groups/refresh

Warning

Don't call it frequently, it can cause a rate-overlimit error. Usually the groups API already has up-to-date information.

Get the group

GET /api/{session}/groups/{groupId}

Delete the group

DELETE /api/{session}/groups/{groupId}

Leave the group

POST /api/{session}/groups/{groupId}/leave

Group picture

Remember to encode the @ symbol in the ID as %40 (e.g. 5215551234567%40g.us).

Get picture

GET /api/{session}/groups/{ID}/picture?refresh=false
Response
{ "url": "https://ejemplo.com/foto.jpg" }

url can be null if the group has no picture. Use refresh=true to force a refresh (by default it's cached for 24 hours; don't refresh frequently to avoid rate-overlimit).

Change picture

PUT /api/{session}/groups/{ID}/picture
Body
{
  "file": {
    "url": "https://ejemplo.com/foto.jpg"
  }
}

Or with base64 data:

Body
{
  "file": {
    "data": "BASE64_DE_LA_IMAGEN"
  }
}

Delete picture

DELETE /api/{session}/groups/{ID}/picture

Change the group subject

PUT /api/{session}/groups/{groupId}/subject
Body
{ "subject": "Nuevo asunto" }

Returns true if it was updated successfully. It can return false if you don't have the required permissions.

Change the group description

PUT /api/{session}/groups/{groupId}/description
Body
{ "description": "New description" }

Returns true if it was updated successfully. It can return false if you don't have the required permissions.

Security · admins only edit info

Allows only admins to edit the group information (title, description, picture).

GET /api/{session}/groups/{groupId}/settings/security/info-admin-only
PUT /api/{session}/groups/{groupId}/settings/security/info-admin-only
Body
{ "adminsOnly": true }

Returns true if it was updated successfully. It can return false if you don't have the required permissions.

Security · admins only messages

Allows only admins to send messages.

GET /api/{session}/groups/{groupId}/settings/security/messages-admin-only
PUT /api/{session}/groups/{groupId}/settings/security/messages-admin-only
Body
{ "adminsOnly": true }

Returns true if it was updated successfully. It can return false if you don't have the required permissions.

Security · who can add members

Controls whether all members or only admins can add new members.

GET /api/{session}/groups/{groupId}/settings/security/member-add-mode
PUT /api/{session}/groups/{groupId}/settings/security/member-add-mode
Body
{
  "membersCanAddNewMember": true
}

Returns true if it was updated successfully. It can return false if you don't have the required permissions.

Participants

Get participants

GET /api/{session}/groups/{groupId}/participants
Response
[
  { "id": "5215551234567@c.us", "role": "participant" },
  { "id": "5219999999999@c.us", "role": "admin" }
]

Also available with an almost identical response across engines:

GET /api/{session}/groups/{groupId}/participants/v2

Possible roles: left, participant, admin, superadmin.

Add participants

POST /api/{session}/groups/{groupId}/participants/add
Body
{
  "participants": [
    { "id": "5215551234567@c.us" }
  ]
}

Remove participants

POST /api/{session}/groups/{groupId}/participants/remove
Body
{
  "participants": [
    { "id": "5215551234567@c.us" }
  ]
}

Admins

Promote to admin

POST /api/{session}/groups/{groupId}/admin/promote
Body
{
  "participants": [
    { "id": "5215551234567@c.us" }
  ]
}

Demote to regular user

POST /api/{session}/groups/{groupId}/admin/demote
Body
{
  "participants": [
    { "id": "5215551234567@c.us" }
  ]
}

Invite code

Get code

With the code you can build the link https://chat.whatsapp.com/{inviteCode} to share it with your contacts.

GET /api/{session}/groups/{groupId}/invite-code

Revoke code

Invalidates the current invite code and generates a new one.

POST /api/{session}/groups/{groupId}/invite-code/revoke

Events

Receive group events through Events: group.v2.join, group.v2.leave, group.v2.participants and group.v2.update. See the payload details on the Events page.