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

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

Request Body

Content-Type: application/json

{
  "messaging_product": "whatsapp",
  "subject": "GROUP_NAME",
  "description": "GROUP_DESCRIPTION"
}

Body Parameters

KeyDescriptionRequiredConstraints
messaging_productMust be "whatsapp"✅ YesFixed value
subjectThe name of the group to be created✅ YesMax 128 characters, trimmed
descriptionDescription of the group❌ NoMax 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

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 to delete✅ YesMust be a valid group ID

Request Body

Content-Type: application/json

{
  "messaging_product": "whatsapp"
}

Body Parameters

KeyDescriptionRequiredConstraints
messaging_productMust be "whatsapp"✅ YesFixed 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

  1. This API is irreversible. Once deleted, the group cannot be restored.
  2. Ensure your API key is valid and associated with the correct Gupshup account.
  3. Group creation is currently only supported for the WhatsApp messaging product.
  4. For help with setup, visit https://www.gupshup.io or contact support.