Create / Delete Group Invite Link
Get WhatsApp Group Invite Link API
This API allows you to retrieve the invite link for an existing WhatsApp group created through your Gupshup app.
Endpoint
POST {{API_FRONT_URL}}/app/{APP_ID}/group/{GROUP_ID}/invite_link
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 | ✅ 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)
{
"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.
Response Parameters
Key | Description |
---|---|
invite_link | A WhatsApp group invite link. Always begins with https://chat.whatsapp.com/ and ends with a unique LINK_ID . |
messaging_product | Will be "whatsapp" |
status | Status of the request, e.g., "success" |
Example cURL
curl --location --globoff '{{API_FRONT_URL}}/app/{{APP_ID}}/group/{{GROUP_ID}}/invite_link' \
--header 'Content-Type: application/json' \
--header 'apikey: {{API_KEY}}' \
--data '{
"messaging_product": "whatsapp"
}'
Notes
- The invite_link can be used to invite users to the WhatsApp group.
- Only works for groups created and managed via the Gupshup platform.
Delete WhatsApp Group Invite Link API
This API deletes the invite link for a specific WhatsApp group created through the Gupshup platform.
Endpoint
DELETE {{API_FRONT_URL}}/app/{APP_ID}/group/{GROUP_ID}/invite_link
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 | ✅ 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, the server will return an appropriate HTTP status code and an error message.
Example cURL
curl --location --globoff --request DELETE '{{API_FRONT_URL}}/app/{{APP_ID}}/group/{{GROUP_ID}}/invite_link' \
--header 'Content-Type: application/json' \
--header 'apikey: {{API_KEY}}' \
--data '{
"messaging_product": "whatsapp"
}'
Notes
- Once deleted, the group’s existing invite link becomes invalid.
- A new invite link must be generated if needed.
Updated about 8 hours ago