WhatsApp Groups
Manage WhatsApp groups programmatically — create groups, update members, and retrieve group information.
Create a Group
POST /v1/whatsapp/groups
Creates a new WhatsApp group and returns its group ID.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | The session to create the group from. |
name | string | Yes | Group display name (max 25 characters). |
participants | array | Yes | Array of E.164 phone numbers to add as participants. |
description | string | No | Group description (max 512 characters). |
bash
curl -X POST https://sendapi.co/v1/whatsapp/groups \
-H "Authorization: Bearer sk_live_123456789" \
-H "Content-Type: application/json" \
-d '{
"session_id": "sess_01H8BKF...Z2T",
"name": "Product Updates",
"participants": ["+447700900000", "+14155552671"]
}'javascript
const group = await client.whatsapp.groups.create({
session_id: 'sess_01H8BKF...Z2T',
name: 'Product Updates',
participants: ['+447700900000', '+14155552671']
});Response
json
{
"id": "grp_01H9...XT",
"name": "Product Updates",
"participants": ["+447700900000", "+14155552671"],
"invite_link": "https://chat.whatsapp.com/XYZ123...",
"created_at": "2026-03-09T14:30:00Z"
}List Groups
GET /v1/whatsapp/groups
Returns all WhatsApp groups for the given session.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Filter groups by session. |
bash
curl "https://sendapi.co/v1/whatsapp/groups?session_id=sess_01H8BKF...Z2T" \
-H "Authorization: Bearer sk_live_123456789"Response
json
{
"data": [
{
"id": "grp_01H9...XT",
"name": "Product Updates",
"participant_count": 12,
"created_at": "2026-03-09T14:30:00Z"
}
],
"meta": { "total": 1 }
}Update a Group
PUT /v1/whatsapp/groups/{id}
Update a group's name, description, or participants. You must be the group admin.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | New group name. |
description | string | No | New group description. |
add_participants | array | No | Phone numbers to add to the group. |
remove_participants | array | No | Phone numbers to remove from the group. |
bash
curl -X PUT https://sendapi.co/v1/whatsapp/groups/grp_01H9...XT \
-H "Authorization: Bearer sk_live_123456789" \
-H "Content-Type: application/json" \
-d '{
"add_participants": ["+250788000000"],
"remove_participants": ["+14155552671"]
}'Admin Required
You can only modify groups where the session phone number is an admin. The API will return a 403 error if the session is not a group admin.