Skip to content

Managing Groups

Evolution API Lite provides comprehensive group management capabilities, allowing you to create groups, manage participants, update settings, and handle invitations programmatically.

Create new WhatsApp groups with initial participants and settings.

POST /group/{instanceName}/create
{
"subject": "My New Group",
"participants": ["5511999999999", "5511888888888"]
}
  • subject (required): The group name/title
  • participants (required): Array of phone numbers to add as initial participants
  • description (optional): Group description text
  • promoteParticipants (optional): Whether to promote added participants to admin
Terminal window
curl -X POST "https://your-api-url/group/your-instance/create" \
-H "Content-Type: application/json" \
-H "apikey: your-api-key" \
-d '{
"subject": "Development Team",
"participants": ["5511999999999", "5511888888888"],
"description": "Daily standup and project updates"
}'
{
"id": "120363123456789012@g.us",
"subject": "Development Team",
"creation": 1640995200,
"owner": "5511999999999@s.whatsapp.net",
"participants": [
{
"id": "5511999999999@s.whatsapp.net",
"admin": "admin"
},
{
"id": "5511888888888@s.whatsapp.net",
"admin": null
}
]
}

Retrieve all groups the instance is part of.

GET /group/{instanceName}/fetchAllGroups?getParticipants=true
  • getParticipants: Set to “true” to include participant details, “false” for basic info only
Terminal window
curl -X GET "https://your-api-url/group/your-instance/fetchAllGroups?getParticipants=true" \
-H "apikey: your-api-key"

Get detailed information about a specific group.

GET /group/{instanceName}/findGroupInfos?groupJid={groupJid}
Terminal window
curl -X GET "https://your-api-url/group/your-instance/findGroupInfos?groupJid=120363123456789012@g.us" \
-H "apikey: your-api-key"
{
"id": "120363123456789012@g.us",
"subject": "Development Team",
"creation": 1640995200,
"owner": "5511999999999@s.whatsapp.net",
"desc": "Daily standup and project updates",
"descOwner": "5511999999999@s.whatsapp.net",
"descId": "12345",
"restrict": false,
"announce": false,
"size": 5,
"participants": [
{
"id": "5511999999999@s.whatsapp.net",
"admin": "admin"
}
]
}

Retrieve the list of participants in a group.

GET /group/{instanceName}/participants?groupJid={groupJid}
Terminal window
curl -X GET "https://your-api-url/group/your-instance/participants?groupJid=120363123456789012@g.us" \
-H "apikey: your-api-key"

Add, remove, promote, or demote group participants.

POST /group/{instanceName}/updateParticipant
{
"groupJid": "120363123456789012@g.us",
"action": "add",
"participants": ["5511777777777", "5511666666666"]
}
  • add: Add new participants to the group
  • remove: Remove participants from the group
  • promote: Promote participants to admin status
  • demote: Remove admin status from participants
Terminal window
curl -X POST "https://your-api-url/group/your-instance/updateParticipant" \
-H "Content-Type: application/json" \
-H "apikey: your-api-key" \
-d '{
"groupJid": "120363123456789012@g.us",
"action": "add",
"participants": ["5511777777777"]
}'

Change the group name/title.

POST /group/{instanceName}/updateGroupSubject
{
"groupJid": "120363123456789012@g.us",
"subject": "New Group Name"
}
Terminal window
curl -X POST "https://your-api-url/group/your-instance/updateGroupSubject" \
-H "Content-Type: application/json" \
-H "apikey: your-api-key" \
-d '{
"groupJid": "120363123456789012@g.us",
"subject": "Updated Development Team"
}'

Change or remove the group description.

POST /group/{instanceName}/updateGroupDescription
{
"groupJid": "120363123456789012@g.us",
"description": "Updated team collaboration group with new objectives"
}
Terminal window
curl -X POST "https://your-api-url/group/your-instance/updateGroupDescription" \
-H "Content-Type: application/json" \
-H "apikey: your-api-key" \
-d '{
"groupJid": "120363123456789012@g.us",
"description": "New project guidelines and daily updates"
}'

Change the group profile picture.

POST /group/{instanceName}/updateGroupPicture
{
"groupJid": "120363123456789012@g.us",
"image": "https://example.com/new-group-picture.jpg"
}
Terminal window
curl -X POST "https://your-api-url/group/your-instance/updateGroupPicture" \
-H "Content-Type: application/json" \
-H "apikey: your-api-key" \
-d '{
"groupJid": "120363123456789012@g.us",
"image": "https://example.com/group-logo.png"
}'

Configure group permissions and settings.

POST /group/{instanceName}/updateSetting
{
"groupJid": "120363123456789012@g.us",
"action": "restrict",
"restrict": true
}
  • restrict: When true, only admins can send messages
  • announce: When true, only admins can send messages (announcement mode)
Terminal window
curl -X POST "https://your-api-url/group/your-instance/updateSetting" \
-H "Content-Type: application/json" \
-H "apikey: your-api-key" \
-d '{
"groupJid": "120363123456789012@g.us",
"action": "restrict",
"restrict": true
}'

Create an invitation link for the group.

POST /group/{instanceName}/inviteCode
{
"groupJid": "120363123456789012@g.us"
}
Terminal window
curl -X POST "https://your-api-url/group/your-instance/inviteCode" \
-H "Content-Type: application/json" \
-H "apikey: your-api-key" \
-d '{
"groupJid": "120363123456789012@g.us"
}'
{
"inviteCode": "ABC123DEF456",
"inviteUrl": "https://chat.whatsapp.com/ABC123DEF456"
}

Revoke the current invitation link and generate a new one.

POST /group/{instanceName}/revokeInviteCode
{
"groupJid": "120363123456789012@g.us"
}
Terminal window
curl -X POST "https://your-api-url/group/your-instance/revokeInviteCode" \
-H "Content-Type: application/json" \
-H "apikey: your-api-key" \
-d '{
"groupJid": "120363123456789012@g.us"
}'

Remove the instance from a group.

POST /group/{instanceName}/leaveGroup
{
"groupJid": "120363123456789012@g.us"
}
Terminal window
curl -X POST "https://your-api-url/group/your-instance/leaveGroup" \
-H "Content-Type: application/json" \
-H "apikey: your-api-key" \
-d '{
"groupJid": "120363123456789012@g.us"
}'

Join a group using an invitation code.

POST /group/{instanceName}/joinGroup
{
"inviteCode": "ABC123DEF456"
}
Terminal window
curl -X POST "https://your-api-url/group/your-instance/joinGroup" \
-H "Content-Type: application/json" \
-H "apikey: your-api-key" \
-d '{
"inviteCode": "ABC123DEF456"
}'

Common errors when managing groups:

{
"error": true,
"message": "Insufficient permissions to perform this action",
"code": "INSUFFICIENT_PERMISSIONS"
}
{
"error": true,
"message": "Group not found or instance is not a participant",
"code": "GROUP_NOT_FOUND"
}
{
"error": true,
"message": "One or more participants are invalid or not on WhatsApp",
"code": "INVALID_PARTICIPANTS"
}
  1. Verify Group Membership

    Always check if the instance is a member of the group before performing operations.

  2. Handle Permissions

    Ensure the instance has admin privileges for actions that require them (adding/removing participants, changing settings).

  3. Validate Phone Numbers

    Use the WhatsApp number validation endpoint before adding participants to groups.

  4. Implement Rate Limiting

    Avoid rapid group operations to prevent being blocked by WhatsApp.

  5. Monitor Group Changes

    Set up webhooks to receive notifications about group membership changes and updates.