WhatsApp group API: read, send and stream group messages
A WhatsApp group API lets your own software list the groups a number is in, read recent group messages, post to a group and receive new messages as they happen. With CallMePing you link one number by QR code, create an API key and you are calling the group endpoints in a few minutes.
What the group API can do
The developer API and webhooks are included on every plan, starting with Starter. WhatsApp group management for teams, the workflow built on top of it, is part of the Growth plan. Enterprise adds higher API rate limits.
- List the groups your linked number is in, with details and members.
- Read the recent messages of any group, up to 200 at a time.
- Send text or media to a group, or reply to a specific message.
- Rename a group, add or remove members (the number must be a group admin).
- Receive every new message and group event on your own server through webhooks.
Before you start
Every request sends the key as a Bearer token. In the examples, BASE stands for the base URL shown on your Developer API screen.
- Link a number by scanning the QR code in Linked Devices. For team groups, use a dedicated number, so it only sees the groups you add it to.
- Open the Developer API screen and create an API key. It is shown once, so store it safely.
- Add the linked number to the group you want to read. It sees only the groups it is a member of.
Test your key and list your groups
Group ids look like 120363012345678901@g.us. Keep the ids of the groups you care about, you will use them in every call below.
curl "$BASE/me" \
-H "Authorization: Bearer YOUR_API_KEY"curl "$BASE/groups" \
-H "Authorization: Bearer YOUR_API_KEY"Read recent messages and post to a group
Only send when the number is connected. The /me call returns a status, and it should be working before you post.
curl "$BASE/groups/120363012345678901@g.us/messages?limit=50" \
-H "Authorization: Bearer YOUR_API_KEY"curl -X POST "$BASE/groups/120363012345678901@g.us/messages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "text": "Reminder: sales review at 5 PM today" }'Stream group messages in real time
Polling the messages endpoint works for a quick report. For a live dashboard, use webhooks instead. Save a webhook URL on the Developer API screen, tick message.any to receive every new message, and add the group events if you want to know when members join or leave.
Each call is a JSON POST with an event name, your session id and a payload. Group messages arrive with the group id, the one that ends in @g.us, in the from field, and the sender is identified in the payload and at the end of the message id.
{
"event": "message.any",
"session": "acct_ab12cd34ef56",
"payload": {
"id": "false_120363012345678901@g.us_3EB0E5F6A7B8_14155550142@c.us",
"timestamp": 1790763300,
"from": "120363012345678901@g.us",
"fromMe": false,
"body": "Met Northbridge Foods, demo done. Quote sent.",
"hasMedia": false
}
}What teams build with it
CallMePing does not ship a team dashboard today. You build it on the API, and we can also build one for your team depending on what you need to track. Email hello@callmeping.com.
- A live board of what each person on a sales or operations team posted today.
- A daily report that lands in your inbox or in a manager group.
- Alerts when a group has been quiet, or when a keyword such as urgent appears.
- A CRM or sheet that fills itself from the updates people already send.
Frequently asked questions
Is this the official WhatsApp Business API?
No. Ping works through a linked device, like WhatsApp Web. That is not part of Meta's official API, and WhatsApp's terms restrict unofficial automation, so use a dedicated number and keep it to work groups.
Does every member of the group need CallMePing?
No. Only the number you link needs to be in the group. Everyone else keeps using WhatsApp as normal.
Can I read older messages than the last 200?
The messages endpoint returns up to 200 recent messages per call. For a full history, store messages as they arrive through webhooks.
Which plan do I need?
The developer API and webhooks are included on every plan, including Starter. Group management for teams is on Growth, and Enterprise adds higher API rate limits.
Keep reading
Put Ping on your WhatsApp
Scan a QR code and Ping is live in about a minute. 7 days free, no card needed.
Start Free Trial
