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
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 |
Query parameters
Parameter | Description | Required | Constraints |
---|---|---|---|
fields | Comma-separated list of fields to include | ❌ No | Optional. If omitted, only the group id is returned. |
Available Fields
Field | Description | Sample Return Value |
---|---|---|
subject | The group subject | "Artificial Intelligence Insights" |
description | Group description (if set during creation) | "Explore AI developments, share knowledge, and discuss the future of AI." |
suspended | Whether the group has been suspended by WhatsApp | false |
creation_timestamp | UNIX timestamp (seconds) when the group was created | 683731200 |
participants | List of participant WA_IDs | [{"wa_id": "2228675309"}, {"wa_id": "7693349922"}] |
total_participant_count | Total number of participants (excluding your business) | 6 |
Path parameters
Parameter | Description | Required | Constraints |
---|---|---|---|
APP_ID | ID of your WhatsApp app | ✅ Yes | Must be a valid App ID |
GROUP_ID | ID of the WhatsApp group | ✅ Yes | Must 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:
- Invalid or missing APP_ID, GROUP_ID, or apikey
- 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
- If fields is not specified, only the group id will be returned.
- You can combine multiple fields using commas: ?fields=subject,participants.
- 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
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 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",
"subject": "GROUP_NEW_SUBJECT",
"description": "GROUP NEW DESCRIPTION",
"file_type": "image/jpeg",
"file": "Binary file stream (e.g., image/jpeg)"
}
Body Parameters
Key | Description | Required | Constraints |
---|---|---|---|
messaging_product | Must be "whatsapp" | ✅ Yes | Fixed value |
subject | New subject for the group | ❌ Optional | Max 128 characters; must not be empty if provided |
description | New group description | ❌ Optional | Max 2048 characters |
file_type | MIME type of the image file | ❌ Optional | Must be image/jpeg |
file | Local image file to set as group profile picture | ❌ Optional | Max 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:
- Unsupported file type
- Image dimensions not square or too large
- Exceeding character limits on subject or description
- 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
- You can update one, multiple, or all fields (subject, description, file) in the same request.
- The profile image must meet the exact file specifications to avoid upload errors.
- This API is useful for programmatically modifying group branding or context.
Updated about 9 hours ago