Create / Delete Group
Create WhatsApp Group API
This API allows you to create a new WhatsApp group using your Gupshup application.
Endpoint
POST {{API_FRONT_URL}}/app/{APP_ID}/group
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 |
Request Body
Content-Type: application/json
{
"messaging_product": "whatsapp",
"subject": "GROUP_NAME",
"description": "GROUP_DESCRIPTION"
}
Body Parameters
Key | Description | Required | Constraints |
---|---|---|---|
messaging_product | Must be "whatsapp" | ✅ Yes | Fixed value |
subject | The name of the group to be created | ✅ Yes | Max 128 characters, trimmed |
description | Description of the group | ❌ No | Max 2048 character |
Response
Success (HTTP 200)
{
"messaging_product": "whatsapp",
"request_id": "REQUEST_ID",
"status": "success"
}
Example cURL
curl --location --globoff '{{API_FRONT_URL}}/app/{{APP_ID}}/group' \
--header 'Content-Type: application/json' \
--header 'apikey: {{API_KEY}}' \
--data '{
"messaging_product": "whatsapp",
"subject": "GROUP_NAME",
"description": "GROUP_DESCRIPTION"
}'
Delete WhatsApp Group API
This API allows you to delete an existing WhatsApp group associated with your Gupshup app.
Endpoint
DELETE {{API_FRONT_URL}}/app/{APP_ID}/group/{GROUP_ID}
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 to delete | ✅ Yes | Must be a valid group ID |
Request Body
Content-Type: application/json
{
"messaging_product": "whatsapp"
}
Body Parameters
Key | Description | Required | Constraints |
---|---|---|---|
messaging_product | Must be "whatsapp" | ✅ Yes | Fixed value |
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 reasons include invalid APP_ID, GROUP_ID, or an incorrect API key.
Example cURL
curl --location --globoff --request DELETE '{{API_FRONT_URL}}/app/{{APP_ID}}/group/{{GROUP_ID}}' \
--header 'Content-Type: application/json' \
--header 'apikey: {{API_KEY}}' \
--data '{
"messaging_product": "whatsapp"
}'
Notes
- This API is irreversible. Once deleted, the group cannot be restored.
- Ensure your API key is valid and associated with the correct Gupshup account.
- Group creation is currently only supported for the WhatsApp messaging product.
- For help with setup, visit https://www.gupshup.io or contact support.
Updated about 9 hours ago