With this API, you can perform various actions related to WhatsApp groups, such as creating, editing, adding and removing members, as well as setting permissions and efficiently managing groups.
To authenticate requests, include the API Key (apiKey) and the Instance ID (id) in the header.
{
"apiKey": "Your API key here",
"id": "Your instance ID here"
}
This API allows you to create new WhatsApp groups through WhatsApp Web JS. To create a group, you need to define a name and add at least one participant.
Base URL:
https://apiwhatsappweb.com/api/create-group
All requests must be made to this base URL.
To authenticate requests, include the API Key (apiKey) and Instance ID (id) in the header.
{ "apiKey": "Your API key here", "id": "Your instance ID here" }
The request body should be a JSON object with the following structure:
{ "groupName": "Group Name", "participants": ["5511999999999", "5511888888888"] }
const axios = require("axios"); let data = JSON.stringify({ "id": "INSTANCE_ID", "groupName": "Group Name", "participants": ["5511999999999", "5511888888888"] }); let config = { method: 'post', url: 'https://apiwhatsappweb.com/api/create-group', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => console.log(response.data)) .catch((error) => console.error(error));
import requests url = 'https://apiwhatsappweb.com/api/create-group' headers = { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' } data = { "id": "INSTANCE_ID", "groupName": "Group Name", "participants": ["5511999999999", "5511888888888"] } response = requests.post(url, headers=headers, json=data) print(response.json())
This API allows you to retrieve all WhatsApp group IDs from a given active instance by sending a POST request.
Base URL:
https://apiwhatsappweb.com/api/get-group-ids
To authenticate requests, include the API Key (apiKey) and the Instance ID (id) in the header.
{
"id": "Your_Instance_ID_Here",
'apiKey': 'Bearer Your_ApiKey',
}
const axios = require("axios"); let config = { method: 'post', url: 'https://apiwhatsappweb.com/api/get-group-ids', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, }; axios.request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); });
import requests url = 'https://apiwhatsappweb.com/api/get-group-ids' headers = { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' } response = requests.post(url, headers=headers) print(response.json())
{
"success": true,
"message": "Group IDs retrieved successfully!",
"groupIds": [
"[email protected]",
"[email protected]",
"[email protected]"
]
}
This API allows you to rename a WhatsApp group by sending a POST request.
Base URL:
https://apiwhatsappweb.com/api/rename-group
To authenticate requests, include the API Key (apiKey) and the Instance ID (id) in the header.
{
"groupId": "[email protected]",
"newName": "New Group Name"
}
The GroupId can be obtained from the webhook received.
Attention!
Ensure that you have administrator permissions in the group before renaming it.
const axios = require("axios"); let data = JSON.stringify({ "groupId": "[email protected]", "newName": "New Group Name" }); let config = { method: 'post', url: 'https://apiwhatsappweb.com/api/rename-group', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); });
import requests url = 'https://apiwhatsappweb.com/api/rename-group' headers = { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' } data = { "groupId": "[email protected]", "newName": "New Group Name" } response = requests.post(url, headers=headers, json=data) print(response.json())
{
"message": "Group name updated successfully!",
"groupId": "[email protected]",
"newName": "New Group Name"
}
This API allows you to change the image of a WhatsApp group by sending a POST request.
Base URL: https://apiwhatsappweb.com/api/change-group-image
To authenticate requests, you must include the API Key (apiKey) and Instance ID (id) in the header.
The request body should be a JSON object with the following structure:
{
"groupId": "[email protected]",
"image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQE..."
}
Examples in Node.js and Python:
{
"message": "Group image updated successfully!",
"groupId": "[email protected]"
}
This API allows you to add a contact to a WhatsApp group by sending a POST request.
Base URL: https://apiwhatsappweb.com/api/add-contact-group
To authenticate requests, you must include the API Key (apiKey) and the Instance ID (id) in the header.
The request body should be a JSON object with the following structure:
{
"groupId": "[email protected]",
"contact": "5511998765432"
}
const axios = require("axios"); let data = JSON.stringify({ "groupId": "[email protected]", "contact": "5511998765432" }); let config = { method: 'post', url: 'https://apiwhatsappweb.com/api/add-contact-group', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => console.log(JSON.stringify(response.data))) .catch((error) => console.log(error));
import requests url = 'https://apiwhatsappweb.com/api/add-contact-group' headers = { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' } data = { "groupId": "[email protected]", "contact": "5511998765432" } response = requests.post(url, headers=headers, json=data) print(response.json())
{
"message": "Contact added successfully!",
"groupId": "[email protected]",
"contact": "5511998765432"
}
This API allows you to remove a contact from a WhatsApp group by sending a POST request.
Base URL:
https://apiwhatsappweb.com/api/remove-contact-group
All requests must be made to this base URL.
To authenticate requests, include the API Key (apiKey) and Instance ID (id) in the header.
The request body should be a JSON object with the following structure:
{
"groupId": "[email protected]",
"contact": "5511998765432"
}
{
"message": "Contact removed successfully!",
"groupId": "[email protected]",
"contact": "5511998765432"
}
This API allows you to approve a contact who requested to join a WhatsApp group by sending a POST request.
Base URL: https://apiwhatsappweb.com/api/approve-contact-group
To authenticate requests, include the API Key (apiKey) and the Instance ID (id) in the header.
The request body should be a JSON object with the following structure:
{
"groupId": "[email protected]",
"contact": "5511998765432"
}
const axios = require("axios"); let data = JSON.stringify({ "groupId": "[email protected]", "contact": "5511998765432" }); let config = { method: 'post', url: 'https://apiwhatsappweb.com/api/approve-contact-group', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => console.log(response.data)) .catch((error) => console.log(error));
import requests url = 'https://apiwhatsappweb.com/api/approve-contact-group' headers = { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' } data = { "groupId": "[email protected]", "contact": "5511998765432" } response = requests.post(url, headers=headers, json=data) print(response.json())
{
"message": "Contact approved successfully!",
"groupId": "[email protected]",
"contact": "5511998765432"
}
This API allows you to reject a contact who requested to join a WhatsApp group.
Base URL:
https://apiwhatsappweb.com/api/reject-contact-group
To authenticate requests, you must include the API Key (apiKey) and the Instance ID (id) in the header.
The request body should be a JSON object with the following structure:
{ "groupId": "[email protected]", "contact": "5511998765432" }
const axios = require("axios"); let data = JSON.stringify({ "groupId": "[email protected]", "contact": "5511998765432" }); let config = { method: 'post', url: 'https://apiwhatsappweb.com/api/reject-contact-group', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => console.log(response.data)) .catch((error) => console.error(error));
import requests url = 'https://apiwhatsappweb.com/api/reject-contact-group' headers = { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' } data = { "groupId": "[email protected]", "contact": "5511998765432" } response = requests.post(url, headers=headers, json=data) print(response.json())
{ "message": "Contact rejected successfully!", "groupId": "[email protected]", "contact": "5511998765432" }
This API allows you to get the list of contacts from a WhatsApp group by sending a GET request.
Base URL:
https://apiwhatsappweb.com/api/get-group-contacts
To authenticate requests, include the API Key (apiKey) and Instance ID (id) in the header.
The request should include the groupId
in the URL, as shown in the example below:
GET /api/[email protected]
Attention!
To access the contacts of a group, you must be a member of the group and have appropriate permissions.
const axios = require("axios"); let config = { method: 'get', url: 'https://apiwhatsappweb.com/api/[email protected]', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here' } }; axios.request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); });
import requests url = 'https://apiwhatsappweb.com/api/[email protected]' headers = { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here' } response = requests.get(url, headers=headers) print(response.json())
{
"groupId": "[email protected]",
"contacts": [
{
"id": "[email protected]",
"name": "John Doe",
"isAdmin": true
},
{
"id": "[email protected]",
"name": "Jane Doe",
"isAdmin": false
}
]
}
This API allows you to change settings for a WhatsApp group, such as who can send messages or change group information.
Base URL: https://apiwhatsappweb.com/api/alter-group-configs
To authenticate requests, you must include the API Key (apiKey) and the Instance ID (id) in the header.
The request body should be a JSON object with the following structure:
{
"groupId": "[email protected]",
"sendMessages": "admins" | "everyone",
"editGroupInfo": "admins" | "everyone"
}
Examples in Node.js and Python:
{
"message": "Group settings updated successfully!",
"groupId": "[email protected]",
"sendMessages": "admins",
"editGroupInfo": "everyone"
}
This API allows you to change the description of a WhatsApp group by sending a POST request.
Base URL: https://apiwhatsappweb.com/api/alter-group-description
To authenticate requests, you must include the API Key (apiKey) and the Instance ID (id) in the header.
The request body should be a JSON object with the following structure:
{
"groupId": "[email protected]",
"description": "This is the new group description."
}
const axios = require("axios"); let data = JSON.stringify({ "groupId": "[email protected]", "description": "This is the new group description." }); let config = { method: 'post', url: 'https://apiwhatsappweb.com/api/alter-group-description', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => console.log(JSON.stringify(response.data))) .catch((error) => console.log(error));
import requests url = 'https://apiwhatsappweb.com/api/alter-group-description' headers = { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' } data = { "groupId": "[email protected]", "description": "This is the new group description." } response = requests.post(url, headers=headers, json=data) print(response.json())
{
"message": "Group description updated successfully!",
"groupId": "[email protected]",
"description": "This is the new group description."
}
This API allows you to generate a new invitation link for a WhatsApp group.
Base URL:
https://apiwhatsappweb.com/api/generate-group-link
All requests must be made to this base URL.
To authenticate requests, include the API Key (apiKey) and the Instance ID (id) in the header.
The request must include the groupId
in the URL, as shown in the example below:
POST /api/[email protected]
{
"message": "New group invitation link generated successfully!",
"groupId": "[email protected]",
"inviteLink": "https://chat.whatsapp.com/KJHGFDSERTYUI"
}
This API allows you to accept a WhatsApp group invite by sending a POST request.
Base URL: https://apiwhatsappweb.com/api/accept-group-invite
To authenticate requests, include the API Key (apiKey) and the Instance ID (id) in the header.
The request body should be a JSON object with the following structure:
{
"inviteCode": "KJHGFDSERTYUI"
}
const axios = require("axios"); let data = JSON.stringify({ "inviteCode": "KJHGFDSERTYUI" }); let config = { method: 'post', url: 'https://apiwhatsappweb.com/api/accept-group-invite', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => console.log(response.data)) .catch((error) => console.log(error));
import requests url = 'https://apiwhatsappweb.com/api/accept-group-invite' headers = { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' } data = { "inviteCode": "KJHGFDSERTYUI" } response = requests.post(url, headers=headers, json=data) print(response.json())
{
"message": "Successfully joined the group!",
"groupId": "[email protected]"
}
This API allows you to promote a member to an admin of a WhatsApp group.
Base URL:
https://apiwhatsappweb.com/api/set-group-admin
To authenticate requests, you must include the API Key (apiKey) and Instance ID (id) in the header.
The request body should be a JSON object with the following structure:
{ "groupId": "[email protected]", "contact": "5511998765432" }
const axios = require("axios"); let data = JSON.stringify({ "groupId": "[email protected]", "contact": "5511998765432" }); let config = { method: 'post', url: 'https://apiwhatsappweb.com/api/set-group-admin', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => console.log(response.data)) .catch((error) => console.error(error));
import requests url = 'https://apiwhatsappweb.com/api/set-group-admin' headers = { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' } data = { "groupId": "[email protected]", "contact": "5511998765432" } response = requests.post(url, headers=headers, json=data) print(response.json())
{ "message": "Contact promoted to admin successfully!", "groupId": "[email protected]", "contact": "5511998765432" }
This API allows you to remove an admin from a WhatsApp group.
Base URL:
https://apiwhatsappweb.com/api/remove-group-admin
To authenticate requests, you must include the API Key (apiKey) and the Instance ID (id) in the header.
The request body should be a JSON object with the following structure:
{ "groupId": "[email protected]", "contact": "5511998765432" }
const axios = require("axios"); let data = JSON.stringify({ "groupId": "[email protected]", "contact": "5511998765432" }); let config = { method: 'post', url: 'https://apiwhatsappweb.com/api/remove-group-admin', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => console.log(response.data)) .catch((error) => console.error(error));
import requests url = 'https://apiwhatsappweb.com/api/remove-group-admin' headers = { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' } data = { "groupId": "[email protected]", "contact": "5511998765432" } response = requests.post(url, headers=headers, json=data) print(response.json())
{ "message": "Admin rights removed successfully!", "groupId": "[email protected]", "contact": "5511998765432" }
This API allows you to mention a specific member of a WhatsApp group when sending a message.
Base URL:
https://apiwhatsappweb.com/api/mention-group-member
To authenticate requests, include the API Key (apiKey) and Instance ID (id) in the header (Header).
{
"groupId": "[email protected]",
"contact": "5511998765432",
"message": "Hello @user, welcome to the group!"
}
Attention!
The mentioned member must be part of the group. Be sure to use the correct number and with the country code.
const axios = require("axios"); let data = JSON.stringify({ "groupId": "[email protected]", "contact": "5511998765432", "message": "Hello @user, welcome to the group!" }); let config = { method: 'post', url: 'https://apiwhatsappweb.com/api/mention-group-member', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); });
import requests url = 'https://apiwhatsappweb.com/api/mention-group-member' headers = { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' } data = { "groupId": "[email protected]", "contact": "5511998765432", "message": "Hello @user, welcome to the group!" } response = requests.post(url, headers=headers, json=data) print(response.json())
{
"message": "Mention sent successfully!",
"groupId": "[email protected]",
"contact": "5511998765432"
}
This API allows you to mention all members of a WhatsApp group when sending a message.
Base URL: https://apiwhatsappweb.com/api/mention-group
To authenticate requests, you must include the API Key (apiKey) and the Instance ID (id) in the header.
The request body should be a JSON object with the following structure:
{
"groupId": "[email protected]",
"message": "Hello @everyone, this is a message for the whole group!"
}
Examples in Node.js and Python:
{
"message": "Group mention sent successfully!",
"groupId": "[email protected]"
}