Skip to content

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

ParameterTypeRequiredDescription
session_idstringYesThe session to create the group from.
namestringYesGroup display name (max 25 characters).
participantsarrayYesArray of E.164 phone numbers to add as participants.
descriptionstringNoGroup 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

ParameterTypeRequiredDescription
session_idstringYesFilter 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

ParameterTypeRequiredDescription
namestringNoNew group name.
descriptionstringNoNew group description.
add_participantsarrayNoPhone numbers to add to the group.
remove_participantsarrayNoPhone 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.

Released under the MIT License.