Send messages to a WhatsApp group with the API
Post team announcements, community updates and daily reports to a WhatsApp group from your own code. Your linked WhatsApp number sends them to any group it's a member of, picked by the group's exact name.
Free trial: 50 messages in any 30 days, no card.
How it works
Get your API key and link your number
Sign up, then link your WhatsApp number on the WhatsApp numbers page with a QR code or a pairing code, like WhatsApp Web. On Settings → API keys, create a key and copy your Client ID (the API keys guide below shows where). The ID on the number's card (such as ID 678) is your
whatsapp_client.Make sure your number is in the group
The number you send from must be a member of the group, and an admin if only admins can post there. Note the group's name exactly as WhatsApp shows it, emoji and punctuation included.
Send to the group
POST to
https://wbiztool.com/api/v1/send_msg/group/withgroup_nameandmsg. A reply with"status": 1and amsg_idmeans the message is queued.Check that it went out
The group is looked up when the message is sent, not when you call the API. Check Message status or a webhook: a wrong name fails there with
Group not found.
Group messages code examples
curl -X POST https://wbiztool.com/api/v1/send_msg/group/ \
-H "Content-Type: application/json" \
-d '{
"client_id": 12345,
"api_key": "YOUR_API_KEY",
"whatsapp_client": 678,
"msg_type": 0,
"group_name": "Sales Team Mumbai",
"msg": "Reminder: *weekly review* starts at 4 PM today."
}'import requests
response = requests.post(
"https://wbiztool.com/api/v1/send_msg/group/",
json={
"client_id": 12345,
"api_key": "YOUR_API_KEY",
"whatsapp_client": 678,
"msg_type": 0,
"group_name": "Sales Team Mumbai",
"msg": "Reminder: *weekly review* starts at 4 PM today.",
},
timeout=60,
)
result = response.json() # read the body even when the HTTP code is 400
if result.get("status") == 1:
print("Queued with msg_id", result["msg_id"])
else:
print("Failed:", result.get("message"))from wbiztool_client import WbizToolClient
client = WbizToolClient(api_key="YOUR_API_KEY", client_id=12345)
result = client.send_message_to_group(
group_name="Sales Team Mumbai",
msg="Reminder: weekly review starts at 4 PM today.",
whatsapp_client=678,
)
print(result)// Node.js 18+ (built-in fetch). Save as .mjs to use top-level await.
const response = await fetch("https://wbiztool.com/api/v1/send_msg/group/", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
client_id: 12345,
api_key: "YOUR_API_KEY",
whatsapp_client: 678,
msg_type: 1,
group_name: "Sales Team Mumbai",
img_url: "https://example.com/reports/weekly-sales.png",
msg: "This week's sales summary",
}),
});
console.log(await response.json());<?php
$payload = [
'client_id' => 12345,
'api_key' => 'YOUR_API_KEY',
'whatsapp_client' => 678,
'msg_type' => 0,
'group_name' => 'Sales Team Mumbai',
'msg' => 'Reminder: *weekly review* starts at 4 PM today.',
];
$ch = curl_init('https://wbiztool.com/api/v1/send_msg/group/');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 60,
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($result['status'] ?? 0) === 1) {
echo 'Queued with msg_id ' . $result['msg_id'];
} else {
echo 'Failed: ' . ($result['message'] ?? 'no response');
}What you can do
Texts, images and files
msg_type0 sends text, 1 an image fromimg_urland 2 a file fromfile_url, or upload the file as multipart form data in a field namedfile.Picked by the group's name
There's no group ID to look up:
group_nameis the group's exact name in WhatsApp. Write it with the same upper and lower case as WhatsApp shows it; partial names don't match.Schedule a group message
Schedule message (
/api/v1/schedule_msg/) takesgroup_nameinstead ofphone, with a date, time and timezone.Groups and numbers in one request
Send to multiple numbers accepts group names mixed with phone numbers, so one call can reach several groups.
Status by webhook
Pass
webhookto get a POST with themsg_idandSENTorFAILED, or call Message status with themsg_id.
Good to know
- Sending to a WhatsApp group through the API (
group_nameinstead ofphone) works on every plan, including the free trial. - The group name isn't checked when you call the API, so
"status": 1only means queued. A name that doesn't match exactly, a contact with the same name, or an admins-only group your number can't post in fails later withGroup not found. - If two groups have exactly the same name, the message goes to the first one in WhatsApp's search results. Give each group a unique name, and update
group_nameif someone renames the group. - Each group message counts as one message towards the number's 1,000 a day under fair use.
- Messages go out from your own WhatsApp number, so WhatsApp's own rules apply: message people who expect to hear from you.
Questions
- How do I find a WhatsApp group's ID?
- You don't need one. The API finds the group by its name: send
group_nameexactly as WhatsApp shows it, emoji and punctuation included, from a number that's in the group. - Which plans can send to groups through the API?
- Every plan, including the free trial. A group message counts as one message, like a message to a phone number.
- Why did my group message fail with
Group not found? - The name didn't match a group exactly, a contact has the same name, your number isn't in the group, or only admins can post and your number isn't one. Check the exact spelling and case in WhatsApp.
- Can I schedule a message to a group?
- Yes. POST to
/api/v1/schedule_msg/withgroup_nameinstead ofphone, plusdate(dd/mm/yyyy),time(HH:MM) andtimezone. - Do I need the WhatsApp Business API or Meta approval?
- No. WbizTool sends from your own WhatsApp or WhatsApp Business number, linked like WhatsApp Web. There's no Meta approval and no message templates to get approved.
Read the guides
- Send to group API
- Send to multiple numbers API
- Schedule message API
- Message status API
- Plans and billing
- API keys and Client ID
Related
- cURLSend, schedule and track WhatsApp messages with one cURL command.
- PythonSend WhatsApp messages from Python with the official client or plain requests.
- Node.jsSend WhatsApp messages from Node.js with the official client or built-in fetch.
- PHPSend WhatsApp messages from PHP with the cURL extension – no library needed.
Send your first automated WhatsApp message today
Create an account, scan the QR code and send a message in under five minutes.
Start freePaid plans start at $25 a month in the US. Pricing
