Remove Group Participants

Remove Participants from WhatsApp Group API

This API allows you to remove one or more participants from a WhatsApp group managed through Gupshup.


Endpoint

DELETE {{API_FRONT_URL}}/app/{APP_ID}/group/{GROUP_ID}/participants

Headers

KeyDescriptionRequired
apikeyAPI key of the account where the app exists. Must be a valid Gupshup.io API key.✅ Yes
Content-TypeMust be application/json.✅ Yes

Path parameters

ParameterDescriptionRequiredConstraints
APP_IDID of your WhatsApp app✅ YesMust be a valid Gupshup App ID
GROUP_IDID of the WhatsApp group✅ YesMust be a valid group ID

Request Body

Content-Type: application/json

{
  "messaging_product": "whatsapp",
  "participants": [
    { "user": "<PHONE_NUMBER> or <WA_ID>" },
    { "user": "<PHONE_NUMBER> or <WA_ID>" }
  ]
}

Body Parameters

KeyDescriptionRequiredConstraints
messaging_productMust be "whatsapp"✅ YesFixed value
participantsArray of objects with a user field (phone number or WhatsApp ID to remove)✅ YesMax 8 participants, not empty

Response

Success (HTTP 200)

{
  "messaging_product": "whatsapp",
  "request_id": "REQUEST_ID",
  "status": "success"
}

Error
If the request fails, an appropriate HTTP status code and error message will be returned. Common issues include:

  1. Invalid GROUP_ID or APP_ID
  2. Empty or malformed participants array

Example cURL

curl --location --globoff --request DELETE '{{API_FRONT_URL}}/app/{{APP_ID}}/group/{{GROUP_ID}}/participants' \
--header 'Content-Type: application/json' \
--header 'apikey: {{API_KEY}}' \
--data '{
  "messaging_product": "whatsapp",
  "participants": [
    { "user": "918888888888" },
    { "user": "917777777777" }
  ]
}'

Notes

  1. The participant phone numbers or WA_IDs must be in international format.
  2. Only up to 8 participants can be removed in a single request.
  3. The business phone number (group creator) cannot be removed using this API.