Send Message API (Group)
Send Message to WhatsApp Group API
This API allows you to send a text message to a WhatsApp group using the specified app ID and group ID.
NOTE: This is a v3 passthrough API. All text messages which can be sent to an individual can be sent to group as well using same parameters. Only difference is that the recipient_type should be set to "group", and the to field should contain the {Group ID}. Please refer to v3 send message APIs for more info.
Limitation: API only supports text message types for now. Media messages are not supported as per our testing. This is not explicitly mentioned in Meta documentation though.
Endpoint
POST {{API_FRONT_URL}}/wa/app/{APP_ID}/v3/msg
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",
"to": "{{GROUP_ID}}",
"type": "text",
"recipient_type": "group",
"text": {
"body": "################### Testing for INFO ######################"
}
}
Body Parameters
Field | Type | Required | Description |
---|---|---|---|
messaging_product | string | ✅ Yes | Must be "whatsapp" . |
to | string | ✅ Yes | The unique identifier of the WhatsApp group (e.g., group ID). |
type | string | ✅ Yes | Type of message. Use "text" for plain text messages. |
recipient_type | string | ✅ Yes | Must be "group" for group messages. |
text.body | string | ✅ Yes | The message content to be sent to the group. |
Response
Success (HTTP 200)
{
"invite_link": "https://chat.whatsapp.com/LINK_ID",
"messaging_product": "whatsapp",
"status": "success"
}
Error
If the request fails, an appropriate HTTP status code and error message will be returned. Ensure your APP_ID, GROUP_ID, and apikey are valid and active.
Example cURL
curl --location --globoff '{{API_FRONT_URL}}/wa/app/{{APP_ID}}/v3/msg' \
--header 'Content-Type: application/json' \
--header 'apikey: {{API_KEY}}' \
--data '{
"messaging_product": "whatsapp",
"to": "GROUP_ID",
"type": "text",
"recipient_type": "group",
"text": {
"body": "################### Testing for INFO ######################"
}'
Notes
- Ensure the group ID is valid and the app has permission to send messages to the group.
- The message body has a maximum character limit (typically 4096 characters for WhatsApp messages).
- recipient_type must be "group" for group messages; use "individual" for personal chats.
Updated about 7 hours ago