The group management endpoint allows you to perform various WhatsApp group operations including creating groups, managing participants, and updating group settings.

Key Operations:

  • Create new groups with specified participants
  • Update group details (name, description, picture)
  • Manage participants (add, remove, promote/demote admins)
  • Handle group invites and messaging permissions

Example Request

curl --location 'https://api.a1base.com/v1/whatsapp/{accountId}/group-management' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-api-secret: YOUR_API_SECRET' \
--header 'Content-Type: application/json' \
--data '{
    "action": "create",
    "agent_number": "+1234567890",
    "title": "New Group",
    "participants": ["+1987654321"]
}'

Request Body

action
string
required

The operation to perform. Valid values:

  • create
  • update_name
  • update_description
  • update_picture
  • add_participants
  • remove_participants
  • promote_admin
  • demote_admin
  • join
  • leave
  • update_settings
agent_number
string
required

The phone number initiating the action (must start with ’+’)

thread_id
string

The group chat ID. Required for all actions except ‘create’

Action-Specific Fields

Example Requests