post
https://partner.gupshup.io/partner/app//v3/message
The interactive product carousel message enables businesses to send horizontally scrollable product cards within WhatsApp conversations, allowing users to browse and engage with products directly in-thread.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
- The product carousel message contains a card object. You must add 2 card objects to your message, and can add a maximum of 10. Each card exists in a cards[] array and must be given a "card_index" value of 0 through 9.
- The type of each card must be set to "product", and each card must reference the same "catalog_id".
- You must add a message body to the message, and no header, footer, or buttons are allowed.
- Lastly, each card must specify the product and catalog identifiers "product_retailer_id" and "catalog_id".
- Use the
recipientparameter only when BSUID is enabled for the app.- When both
toandrecipientfields are used in the payload, thetofield gets the priority.
Request Parameters
| Key | Description | Values | Data Type | Required/Optional | Constraints |
|---|---|---|---|---|---|
| Headers | |||||
| Authorisation | Access Token for the application | sk_8eb35b1f81c24af2xxxxxx | String | Required | Should be a valid Partner App Access Token. |
| Path Params | |||||
| App Id | App ID to fetch the access token | bf9ee64c-3d4d-4ac4-xxxx-732e577007c4 | String | Required | The Id should be a valid app Id of Gupshup |
| Body JSON | |||||
| messaging_product | Messaging product | String | Required | ||
| recipient_type | Recipient type | individual | String | Required | |
| to | Destination phone number where the message needs to be sent | 91785876xxxx | String | Required (Can be optional if BSUID is enabled for the app and recipient parameter is used instead) | Must be a valid phone number |
| recipient | Destination BSUID where the message needs to be sent | IN.461449821882xxxx | String | Optional | Must be a valid BSUID |
| type | Messaging type | interactive | String | Required | Type should be interactive to send interactive message. |
| interactive | interactive message inside body | | Object | Required | Key should be interactive to send text message. |
Sample Request
curl --location 'https://partner.gupshup.io/partner/app/{{app_id}}/v3/message' \
--header 'Authorization: sk_f39ed14bd5exxxxx' \
--header 'Content-Type: application/json' \
--data '{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "918888xxx",
"recipient": "IN.4614498218826880",
"type": "interactive",
"interactive": {
"type": "carousel",
"body": {
"text": "Check out our latest Adidas products!"
},
"action": {
"cards": [
{
"card_index": 0,
"type": "product",
"action": {
"product_retailer_id": "xyli96fcbn",
"catalog_id": "834584418374992"
}
},
{
"card_index": 1,
"type": "product",
"action": {
"product_retailer_id": "zqc2qfz5fm",
"catalog_id": "834584418374992"
}
}
]
}
}
}'Sample Response
{
"messages": [
{
"id": "GUPSHUP_MESSAGE_ID"
}
],
"messaging_product": "whatsapp",
"contacts": [
{
"input": "DESTINATION_PHONE_NO",
"wa_id": "DESTINATION_PHONE_NO"
}
]
}Status Codes
| Status Code | Response | Comment |
|---|---|---|
| Success | ||
| 200 | { "messages": [ { "id": "GUPSHUP_MESSAGE_ID" } ], "messaging_product": "whatsapp", "contacts": [ { "input": "DESTINATION_PHONE_NO", "wa_id": "DESTINATION_PHONE_NO" } ] } | |
| Error | ||
| 401 | { "status": "error", "message": "Authentication Failed" } | When Partner Token authentication fails |
| 400 | { "message": "Callback Billing must be enabled for this API", "status": "error" } | |