Fetch / Update Group Info

Fetch WhatsApp Group Details API

This API retrieves details of a specific WhatsApp group created through the Gupshup platform. You can specify the fields you want in the response using the fields query parameter.


Endpoint

GET {{API_FRONT_URL}}/app/{APP_ID}/group/{GROUP_ID}?fields={fields}

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

Query parameters

ParameterDescriptionRequiredConstraints
fieldsComma-separated list of fields to include❌ NoOptional. If omitted, only the group id is returned.

Available Fields

FieldDescriptionSample Return Value
subjectThe group subject"Artificial Intelligence Insights"
descriptionGroup description (if set during creation)"Explore AI developments, share knowledge, and discuss the future of AI."
suspendedWhether the group has been suspended by WhatsAppfalse
creation_timestampUNIX timestamp (seconds) when the group was created683731200
participantsList of participant WA_IDs[{"wa_id": "2228675309"}, {"wa_id": "7693349922"}]
total_participant_countTotal number of participants (excluding your business)6

Path parameters

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

Response

Success (HTTP 200)

{
  "id": "groupId",
  "messaging_product": "whatsapp",
  "status": "success",
  "subject": "GROUP SUBJECT"
}

Error

If the request fails, a proper HTTP error code and descriptive message will be returned. Common issues include:

  1. Invalid or missing APP_ID, GROUP_ID, or apikey
  2. Requesting unsupported fields

Example cURL

curl --location --globoff '{{API_FRONT_URL}}/app/{{APP_ID}}/group/{{GROUP_ID}}?fields=subject,description,participants' \
--header 'Content-Type: application/json' \
--header 'apikey: {{API_KEY}}'

Notes

  1. If fields is not specified, only the group id will be returned.
  2. You can combine multiple fields using commas: ?fields=subject,participants.
  3. This API is useful for programmatically auditing or displaying group info in your admin dashboard.


Update WhatsApp Group Details API

This API allows you to update the subject, description, or profile picture of a WhatsApp group created using Gupshup.


Endpoint

POST {{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 App ID
GROUP_IDID of the WhatsApp group✅ YesMust be a valid Group ID

Request Body

Content-Type: application/json

{
  "messaging_product": "whatsapp",
  "subject": "GROUP_NEW_SUBJECT",
  "description": "GROUP NEW DESCRIPTION",
  "file_type": "image/jpeg",
  "file": "Binary file stream (e.g., image/jpeg)"
}

Body Parameters

KeyDescriptionRequiredConstraints
messaging_productMust be "whatsapp"✅ YesFixed value
subjectNew subject for the group❌ OptionalMax 128 characters; must not be empty if provided
descriptionNew group description❌ OptionalMax 2048 characters
file_typeMIME type of the image file❌ OptionalMust be image/jpeg
fileLocal image file to set as group profile picture❌ OptionalMax size 5MB, JPEG only, square dimensions (min 192x192 pixels)

Response

Success (HTTP 200)

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

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

  1. Unsupported file type
  2. Image dimensions not square or too large
  3. Exceeding character limits on subject or description
  4. Missing messaging_product

Example cURL

curl --location --globoff '{{API_FRONT_URL}}/app/{{APP_ID}}/group/{{GROUP_ID}}' \
--header 'Content-Type: multipart/form-data' \
--header 'apikey: {{API_KEY}}' \
--form 'messaging_product="whatsapp"' \
--form 'subject="GROUP_NEW_SUBJECT"' \
--form 'description="GROUP NEW DESCRIPTION"' \
--form 'file_type="image/jpeg"' \
--form 'file=@"filePath"'

Notes

  1. You can update one, multiple, or all fields (subject, description, file) in the same request.
  2. The profile image must meet the exact file specifications to avoid upload errors.
  3. This API is useful for programmatically modifying group branding or context.