Skip to main content

Groups

Manage WhatsApp groups through the Wappfy API. You can create groups, manage participants, handle invite links, and more. All group endpoints are scoped to a specific instance:
/api/instances/{instanceId}/groups/...

Create a Group

Create a new WhatsApp group with initial participants.
curl -X POST https://api.wappfy.io/api/instances/inst_abc123/groups \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Project Alpha",
    "participants": [
      "[email protected]",
      "[email protected]"
    ]
  }'
Response:
{
  "data": {
    "group_id": "[email protected]",
    "name": "Project Alpha",
    "participants": [
      {
        "id": "[email protected]",
        "is_admin": false
      },
      {
        "id": "[email protected]",
        "is_admin": false
      }
    ]
  }
}

List Groups

Retrieve all groups the instance is a member of.
curl https://api.wappfy.io/api/instances/inst_abc123/groups \
  -H "X-Api-Key: YOUR_API_KEY"
Response:
{
  "data": [
    {
      "group_id": "[email protected]",
      "name": "Project Alpha",
      "participant_count": 5
    },
    {
      "group_id": "[email protected]",
      "name": "Support Team",
      "participant_count": 12
    }
  ]
}

Get Group Info

Fetch detailed information about a specific group.
curl https://api.wappfy.io/api/instances/inst_abc123/groups/[email protected] \
  -H "X-Api-Key: YOUR_API_KEY"
Response:
{
  "data": {
    "group_id": "[email protected]",
    "name": "Project Alpha",
    "description": "Team workspace for Project Alpha",
    "owner": "[email protected]",
    "created_at": "2026-01-15T10:00:00Z",
    "participants": [
      {
        "id": "[email protected]",
        "is_admin": true,
        "is_super_admin": true
      },
      {
        "id": "[email protected]",
        "is_admin": false,
        "is_super_admin": false
      }
    ]
  }
}

Update a Group

Update the group name or description. You must be a group admin to perform this action.
curl -X PATCH https://api.wappfy.io/api/instances/inst_abc123/groups/[email protected] \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Project Alpha v2",
    "description": "Updated workspace for Project Alpha"
  }'
Only group admins can update the group name and description. If the instance is not an admin, this will return a 403 error.

Leave a Group

Remove the instance from a group.
curl -X POST https://api.wappfy.io/api/instances/inst_abc123/groups/[email protected]/leave \
  -H "X-Api-Key: YOUR_API_KEY"
After leaving a group, you will need an invite link or another admin to add you back.

Participants

List Participants

Get all participants of a group.
curl https://api.wappfy.io/api/instances/inst_abc123/groups/[email protected]/participants \
  -H "X-Api-Key: YOUR_API_KEY"
Response:
{
  "data": [
    {
      "id": "[email protected]",
      "is_admin": true,
      "is_super_admin": true
    },
    {
      "id": "[email protected]",
      "is_admin": false,
      "is_super_admin": false
    },
    {
      "id": "[email protected]",
      "is_admin": true,
      "is_super_admin": false
    }
  ]
}

Add Participants

Add one or more participants to a group. You must be a group admin.
curl -X POST https://api.wappfy.io/api/instances/inst_abc123/groups/[email protected]/participants \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "participants": [
      "[email protected]",
      "[email protected]"
    ]
  }'

Remove Participants

Remove one or more participants from a group. You must be a group admin.
curl -X DELETE https://api.wappfy.io/api/instances/inst_abc123/groups/[email protected]/participants \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "participants": [
      "[email protected]"
    ]
  }'

Invite Codes

Get Invite Code

Generate or retrieve the group’s invite link. You must be a group admin.
curl https://api.wappfy.io/api/instances/inst_abc123/groups/[email protected]/invite-code \
  -H "X-Api-Key: YOUR_API_KEY"
Response:
{
  "data": {
    "invite_code": "https://chat.whatsapp.com/AbCdEfGhIjKlMn"
  }
}

Join via Invite Code

Join a group using an invite code.
curl -X POST https://api.wappfy.io/api/instances/inst_abc123/groups/join \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "invite_code": "AbCdEfGhIjKlMn"
  }'
Pass only the code portion, not the full URL. For https://chat.whatsapp.com/AbCdEfGhIjKlMn, pass AbCdEfGhIjKlMn.

Sending Messages to Groups

To send a message to a group, use the standard send message endpoint with the group’s chat ID:
curl -X POST https://api.wappfy.io/api/instances/inst_abc123/messages/send \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "chat_id": "[email protected]",
    "type": "text",
    "text": "Hello team!"
  }'
Group chat IDs always end with @g.us.

Endpoint Reference

MethodEndpointDescription
POST/api/instances/{id}/groupsCreate a new group
GET/api/instances/{id}/groupsList all groups
GET/api/instances/{id}/groups/{groupId}Get group info
PATCH/api/instances/{id}/groups/{groupId}Update group name/description
POST/api/instances/{id}/groups/{groupId}/leaveLeave a group
GET/api/instances/{id}/groups/{groupId}/participantsList participants
POST/api/instances/{id}/groups/{groupId}/participantsAdd participants
DELETE/api/instances/{id}/groups/{groupId}/participantsRemove participants
GET/api/instances/{id}/groups/{groupId}/invite-codeGet invite code
POST/api/instances/{id}/groups/joinJoin via invite code

Error Handling

Status CodeDescription
403You are not an admin of this group.
404Group not found or instance is not a member.
409Participant is already in the group (on add) or not in the group (on remove).
422Invalid participant format. Use {phone}@s.whatsapp.net.