Skip to content
WbizTool

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

  1. 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.

  2. 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.

  3. Send to the group

    POST to https://wbiztool.com/api/v1/send_msg/group/ with group_name and msg. A reply with "status": 1 and a msg_id means the message is queued.

  4. 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

Send a text to a group (cURL)
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."
  }'
Python (requests)
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"))
Python (official client)
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 (fetch): an image from a URL
// 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 (cURL extension)
<?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_type 0 sends text, 1 an image from img_url and 2 a file from file_url, or upload the file as multipart form data in a field named file.

  • Picked by the group's name

    There's no group ID to look up: group_name is 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/) takes group_name instead of phone, 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 webhook to get a POST with the msg_id and SENT or FAILED, or call Message status with the msg_id.

Good to know

  • Sending to a WhatsApp group through the API (group_name instead of phone) works on every plan, including the free trial.
  • The group name isn't checked when you call the API, so "status": 1 only 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 with Group 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_name if 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_name exactly 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/ with group_name instead of phone, plus date (dd/mm/yyyy), time (HH:MM) and timezone.
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

Related

Send your first automated WhatsApp message today

Create an account, scan the QR code and send a message in under five minutes.

Start free

Paid plans start at $25 a month in the US. Pricing