Learn everything you need to know about managing, automating and sending messages on WhatsApp Groups in 2025. Includes ready-to-use code examples!
This tutorial will explore all the possible use cases for WhatsApp Groups automation using the API — code examples included.
- 👨👩👦👦 Create a new group chat
- 📋 Get a list of available group chats
- 🔧 Update group information and permissions
- 🖼️ Update group image
- ➕ Add participants to a group
- ➖ Remove participants from a group
- 👑 Promote participants as administrators in a group chat
- 👤 Demote participants as administrators in a group chat
- 📩 Get pending approvals for new group members
- 🙆 Approve group members by phone number
- ✅ Approve all pending group members
- 🙅 Reject group members by phone number
- ❌ Reject all pending group members
- 🔗 Get group invite code and URL
- 🔒 Revoke group invite code
- 📨 Join a group by invitation code
- 🚪 Leave a group
🤩 🤖 Wassenger is a complete communication platform and API solution for WhatsApp. Explore more than 100+ API use cases and automate anything on WhatsApp by signing up for a free trial and get started in minutes!
# Create a new group chat
Requirements
- Have a WhatsApp number already linked to the platform and online.
- Get your Wassenger API key here.
API endpoint
We will use the following API endpoint to create the group:
Prepare the request
Target API URL using the POST method
https://api.wassenger.com/v1/devices/{deviceId}/groups
Required HTTPS headers > Obtain your API key here
Content-Type: application/json
Token: $API_TOKEN
Use body in JSON format
{
"name": "Group name",
"description": "This is a group sample description",
"participants": [
{
"phone": "+12345678900",
"admin": true
},
{
"phone": "+12345678901",
"admin": false
}
],
"permissions": {
"edit": "admins",
"send": "all",
"invite": "admins",
"approval": false
}
}
🖥️ Looking for a code example? Go to the API live tester and get ready-to-use code examples in 15+ programming languages, including Python, JavaScript, PHP, C#, Java, Ruby, Go, Powershell, cURL and more.
# Get a list of available group chats
Requirements
- Have a WhatsApp number already linked to the platform and online.
- Get your Wassenger API key here.
API endpoint
We will use the following API endpoint to create the group:
Prepare the request
Target API URL using the GET method
https://api.wassenger.com/v1/devices/{deviceId}/groups
Required HTTPS headers > Obtain your API key here
Content-Type: application/json
Token: $API_TOKEN
🤩 🤖 Wassenger is a complete API solution for WhatsApp. Sign up for a 7-day free trial and get started in minutes!
# Update group information and permissions
Requirements
- Have a WhatsApp number already linked to the platform and online.
- Get your Wassenger API key here.
- Group WhatsApp ID (WID) that you can find in two ways:
How to obtain the Group WhatsApp ID
You can obtain the Group WhatsApp ID by using one of these methods:
- Web: go to number’s settings > Groups > Copy the Group WID.
- API: query the available groups in your number using this endpoint.
API endpoint
We will use the following API endpoint to create the group:
Prepare the request
Target API URL using the PATCH method
https://api.wassenger.com/v1/devices/{deviceId}/groups/{groupId}
Required HTTPS headers > Obtain your API key here
Content-Type: application/json
Token: $API_TOKEN
Use body in JSON format
{
"name": "New group name",
"description": "This is a new group sample description",
"ephemeral": "7d",
"permissions": {
"edit": "admins",
"send": "all",
"invite": "all",
"approval": false
}
}
# Update group image
Requirements
- Have a WhatsApp number already linked to the platform and online.
- Get your Wassenger API key here.
- Group WhatsApp ID (WID) that you can find in two ways:
How to obtain the Group WhatsApp ID
You can obtain the Group WhatsApp ID by using one of these methods:
- Web: go to number’s settings > Groups > Copy the Group WID.
- API: query the available groups in your number using this endpoint.
API endpoint
We will use the following API endpoint to create the group:
Prepare the request
Target API URL using the PUT method
https://api.wassenger.com/v1/devices/{deviceId}/groups/{groupId}/image
Required HTTPS headers > Obtain your API key here
Content-Type: application/json
Token: $API_TOKEN
Use body in JSON format
{
"url": "https://picsum.photos/200"
}
# Add participants to a group
Requirements
- Have a WhatsApp number already linked to the platform and online.
- Get your Wassenger API key here.
- Group WhatsApp ID (WID) that you can find in two ways:
How to obtain the Group WhatsApp ID
You can obtain the Group WhatsApp ID by using one of these methods:
- Web: go to number’s settings > Groups > Copy the Group WID.
- API: query the available groups in your number using this endpoint.
API endpoint
We will use the following API endpoint to create the group:
Prepare the request
Target API URL using the POST method
https://api.wassenger.com/v1/devices/{deviceId}/groups/{groupId}/participants
Required HTTPS headers > Obtain your API key here
Content-Type: application/json
Token: $API_TOKEN
Use body in JSON format
{
"participants": [
{
"phone": "+1234567890",
"admin": true
},
{
"phone": "+1234567890",
"admin": false
}
]
}
🤩 🤖 Wassenger is a complete API solution for WhatsApp. Sign up for a 7-day free trial and get started in minutes!
# Remove participants from a group
Requirements
- Have a WhatsApp number already linked to the platform and online.
- Get your Wassenger API key here.
- Group WhatsApp ID (WID) that you can find in two ways:
How to obtain the Group WhatsApp ID
You can obtain the Group WhatsApp ID by using one of these methods:
- Web: go to number’s settings > Groups > Copy the Group WID.
- API: query the available groups in your number using this endpoint.
API endpoint
We will use the following API endpoint to create the group:
Prepare the request
Target API URL using the DELETE method
https://api.wassenger.com/v1/devices/{deviceId}/groups/{groupId}/participants
Required HTTPS headers > Obtain your API key here
Content-Type: application/json
Token: $API_TOKEN
Use body in JSON format
['+1234567890', '+1234567890'];
# Promote participants as administrators in a group chat
Requirements
- Have a WhatsApp number already linked to the platform and online.
- Get your Wassenger API key here.
- Group WhatsApp ID (WID) that you can find in two ways:
How to obtain the Group WhatsApp ID
You can obtain the Group WhatsApp ID by using one of these methods:
- Web: go to number’s settings > Groups > Copy the Group WID.
- API: query the available groups in your number using this endpoint.
API endpoint
We will use the following API endpoint to create the group:
Prepare the request
Target API URL using the PATCH method
https://api.wassenger.com/v1/devices/{deviceId}/groups/{groupId}/participants
Required HTTPS headers > Obtain your API key here
Content-Type: application/json
Token: $API_TOKEN
Use body in JSON format
{
"participants": [
{
"phone": "+1234567890",
"admin": true
},
{
"phone": "+1234567890",
"admin": true
}
]
}
🖥️ Looking for a code example? Go to the API live tester and get ready-to-use code examples in 15+ programming languages, including Python, JavaScript, PHP, C#, Java, Ruby, Go, Powershell, cURL and more.
# Demote participants as administrators in a group chat
Requirements
- Have a WhatsApp number already linked to the platform and online.
- Get your Wassenger API key here.
- Group WhatsApp ID (WID) that you can find in two ways:
How to obtain the Group WhatsApp ID
You can obtain the Group WhatsApp ID by using one of these methods:
- Web: go to number’s settings > Groups > Copy the Group WID.
- API: query the available groups in your number using this endpoint.
API endpoint
We will use the following API endpoint to create the group:
Prepare the request
Target API URL using the PATCH method
https://api.wassenger.com/v1/devices/{deviceId}/groups/{groupId}/participants
Required HTTPS headers > Obtain your API key here
Content-Type: application/json
Token: $API_TOKEN
Use body in JSON format
{
"participants": [
{
"phone": "+1234567890",
"admin": false
},
{
"phone": "+1234567890",
"admin": false
}
]
}
🤩 🤖 Wassenger is a complete API solution for WhatsApp. Sign up for a 7-day free trial and get started in minutes!
# Get pending approvals for new group members
Requirements
- Have a WhatsApp number already linked to the platform and online.
- Get your Wassenger API key here.
- Group WhatsApp ID (WID) that you can find in two ways:
How to obtain the Group WhatsApp ID
You can obtain the Group WhatsApp ID by using one of these methods:
- Web: go to number’s settings > Groups > Copy the Group WID.
- API: query the available groups in your number using this endpoint.
API endpoint
We will use the following API endpoint to create the group:
Prepare the request
Target API URL using the GET method
https://api.wassenger.com/v1/devices/{deviceId}/groups/{groupId}/members
Required HTTPS headers > Obtain your API key here
Content-Type: application/json
Token: $API_TOKEN
# Approve group members by phone number
Requirements
- Have a WhatsApp number already linked to the platform and online.
- Get your Wassenger API key here.
- Group WhatsApp ID (WID) that you can find in two ways:
How to obtain the Group WhatsApp ID
You can obtain the Group WhatsApp ID by using one of these methods:
- Web: go to number’s settings > Groups > Copy the Group WID.
- API: query the available groups in your number using this endpoint.
API endpoint
We will use the following API endpoint to create the group:
Prepare the request
Target API URL using the POST method
https://api.wassenger.com/v1/devices/{deviceId}/groups/{groupId}/members
Required HTTPS headers > Obtain your API key here
Content-Type: application/json
Token: $API_TOKEN
Use the body in JSON format
{
"phones": ["+1234567890"]
}
🤩 🤖 Wassenger is a complete API solution for WhatsApp. Sign up for a 7-day free trial and get started in minutes!
# Approve all pending group members
Requirements
- Have a WhatsApp number already linked to the platform and online.
- Get your Wassenger API key here.
- Group WhatsApp ID (WID) that you can find in two ways:
How to obtain the Group WhatsApp ID
You can obtain the Group WhatsApp ID by using one of these methods:
- Web: go to numbers settings > Groups > Copy the Group WID.
- API: query the available groups for your number using this endpoint.
API endpoint
We will use the following API endpoint to create the group:
Prepare the request
Target API URL using the POST method
https://api.wassenger.com/v1/devices/{deviceId}/groups/{groupId}/members
Required HTTPS headers > Obtain your API key here
Content-Type: application/json
Token: $API_TOKEN
Use the body in JSON format
{
"all": true
}
# Reject group members by phone number
Requirements
- Have a WhatsApp number already linked to the platform and online.
- Get your Wassenger API key here.
- Group WhatsApp ID (WID) that you can find in two ways:
How to obtain the Group WhatsApp ID
You can obtain the Group WhatsApp ID by using one of these methods:
- Web: go to numbers settings > Groups > Copy the Group WID.
- API: query the available groups for your number using this endpoint.
API endpoint
We will use the following API endpoint to create the group:
Prepare the request
Target API URL using the DELETE method
https://api.wassenger.com/v1/devices/{deviceId}/groups/{groupId}/members
Required HTTPS headers > Obtain your API key here
Content-Type: application/json
Token: $API_TOKEN
Use the body in JSON format
{
"phones": ["+1234567890"]
}
🤩 🤖 Wassenger is a complete API solution for WhatsApp. Sign up for a 7-day free trial and get started in minutes!
# Reject all pending group members
Requirements
- Have a WhatsApp number already linked to the platform and online.
- Get your Wassenger API key here.
- Group WhatsApp ID (WID) that you can find in two ways:
How to obtain the Group WhatsApp ID
You can obtain the Group WhatsApp ID by using one of these methods:
- Web: go to numbers settings > Groups > Copy the Group WID.
- API: query the available groups for your number using this endpoint.
API endpoint
We will use the following API endpoint to create the group:
Prepare the request
Target API URL using the DELETE method
https://api.wassenger.com/v1/devices/{deviceId}/groups/{groupId}/members
Required HTTPS headers > Obtain your API key here
Content-Type: application/json
Token: $API_TOKEN
Use the body in JSON format
{
"all": true
}
# Get group invite code and URL
Requirements
- Have a WhatsApp number already linked to the platform and online.
- Get your Wassenger API key here.
- Group WhatsApp ID (WID) that you can find in two ways:
How to obtain the Group WhatsApp ID
You can obtain the Group WhatsApp ID by using one of these methods:
- Web: go to numbers settings > Groups > Copy the Group WID.
- API: query the available groups for your number using this endpoint.
API endpoint
We will use the following API endpoint to create the group:
Prepare the request
Target API URL using the GET method
https://api.wassenger.com/v1/devices/{deviceId}/groups/{groupId}/invite
Required HTTPS headers > Obtain your API key here
Content-Type: application/json
Token: $API_TOKEN
🤩 🤖 Wassenger is a complete API solution for WhatsApp. Sign up for a 7-day free trial and get started in minutes!
# Revoke group invite code
Requirements
- Have a WhatsApp number already linked to the platform and online.
- Get your Wassenger API key here.
- Group WhatsApp ID (WID) that you can find in two ways:
How to obtain the Group WhatsApp ID
You can obtain the Group WhatsApp ID by using one of these methods:
- Web: go to numbers settings > Groups > Copy the Group WID.
- API: query the available groups for your number using this endpoint.
API endpoint
We will use the following API endpoint to create the group:
Prepare the request
Target API URL using the DELETE method
https://api.wassenger.com/v1/devices/{deviceId}/groups/{groupId}/invite
Required HTTPS headers > Obtain your API key here
Content-Type: application/json
Token: $API_TOKEN
# Join a group by invitation code
Requirements
- Have a WhatsApp number already linked to the platform and online.
- Get your Wassenger API key here.
- Group WhatsApp ID (WID) that you can find in two ways:
How to obtain the Group WhatsApp ID
You can obtain the Group WhatsApp ID by using one of these methods:
- Web: go to numbers settings > Groups > Copy the Group WID.
- API: query the available groups in your number using this endpoint.
API endpoint
We will use the following API endpoint to create the group:
Prepare the request
Target API URL using the PUT method
https://api.wassenger.com/v1/devices/{deviceId}/groups
Required HTTPS headers > Obtain your API key here
Content-Type: application/json
Token: $API_TOKEN
Use the body in JSON format
{
"code": "{{GROUP INVITE CODE}}",
"url": "{{GROUP INVITE URL}}"
}
Replace the following expressions with an actual value:
{{GROUP INVITE CODE}}Replace this expression with the specific value{{GROUP INVITE URL}}Replace this expression with the correct value
# Leave a group
Requirements
- Have a WhatsApp number already linked to the platform and online.
- Get your Wassenger API key here.
- Group WhatsApp ID (WID) that you can find in two ways:
How to obtain the Group WhatsApp ID
You can obtain the Group WhatsApp ID by using one of these methods:
- Web: go to number’s settings > Groups > Copy the Group WID.
- API: query the available groups in your number using this endpoint.
API endpoint
We will use the following API endpoint to create the group:
Prepare the request
Target API URL using the DELETE method
https://api.wassenger.com/v1/devices/{deviceId}/groups
Required HTTPS headers > Obtain your API key here
Content-Type: application/json
Token: $API_TOKEN
Use the body in JSON format
{
"id": "$GROUP_ID@g.us",
"remove": true
}
🤩 🤖 Wassenger is a complete API solution for WhatsApp. Sign up for a 7-day free trial and get started in minutes!
Live API testing
You can live-test and play with the API directly from your browser.
Once you are done testing, get the auto-generated code example in your preferred programming language and you will be ready to go.







