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
Key | Description | Required |
---|---|---|
apikey | API key of the account where the app exists. Must be a valid Gupshup.io API key. | ✅ Yes |
Content-Type | Must be application/json . | ✅ Yes |
Path parameters
Parameter | Description | Required | Constraints |
---|---|---|---|
APP_ID | ID of your WhatsApp app | ✅ Yes | Must be a valid Gupshup App ID |
GROUP_ID | ID of the WhatsApp group | ✅ Yes | Must 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
Key | Description | Required | Constraints |
---|---|---|---|
messaging_product | Must be "whatsapp" | ✅ Yes | Fixed value |
participants | Array of objects with a user field (phone number or WhatsApp ID to remove) | ✅ Yes | Max 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:
- Invalid GROUP_ID or APP_ID
- 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
- The participant phone numbers or WA_IDs must be in international format.
- Only up to 8 participants can be removed in a single request.
- The business phone number (group creator) cannot be removed using this API.
Updated about 8 hours ago