Send Product Card Carousel Template

Use this API to send product card carousel as template

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Product card carousel templates allow you to send a single text message accompanied by a set of up to 10 product cards in a horizontally scrollable view

📘

Note:

  1. Use the recipient parameter only when BSUID is enabled for the app.
  2. When both to and recipient fields are used in the payload, the to field gets the priority.

Request Parameters

Key Description Values Data Types Required/Optional Constraints

Authorization

Access Token for the application

{{PARTNER_APP_TOKEN}}

String

Required

Should be a valid Partner App Access Token.

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

messaging_product

Messaging product

whatsapp

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

video

String

Required

Type should be video to
send video message.

template

Template message inside body

"template": {
"name": "Template"
......
}

Object

Required

Key should be template to send template message.

Sample Request

curl --location 'https://partner.gupshup.io/partner/app/<APP_ID>/v3/message' \
--header 'Authorization: <PARTNER_APP_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "<WHATSAPP_USER_PHONE_NUMBER>",
	"recipient": "<BSUID>",
  "type": "template",
  "template": {
    "name": "<TEMPLATE_NAME>",
    "language": {
      "code": "<TEMPLATE_LANGUAGE>"
    },
    "components": [
      {
        "type": "body",
        "parameters": [
          <MESSAGE_BODY_TEXT_VARIABLE>,
          <MESSAGE_BODY_TEXT_VARIABLE>
        ]
      },
      {
        "type": "carousel",
        "cards": [
          {
            "card_index": <CARD_INDEX>,
            "components": [
              {
                "type": "header",
                "parameters": [
                  {
                    "type": "product",
                    "product": {
                      "product_retailer_id": "<PRODUCT_ID>",
                      "catalog_id": "<CATALOG_ID>"
                    }
                  }
                ]
              }
            ]
          }

          /* Addt'l cards would follow. */

        ]
      }
    ]
  }
}'

Sample Response

{
    "messages": [
        {
            "id": "GUPSHUP_MESSAGE_ID"
        }
    ],
    "messaging_product": "whatsapp",
    "contacts": [
        {
            "input": "DESTINATION_PHONE_NO",
            "wa_id": "DESTINATION_PHONE_NO"
        }
    ]
}

Status Codes

Status CodeResponseComments
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 API key authentication fails
400{ "message": "Callback Billing must be enabled for this API", "status": "error" }If Callback billing is not enabled for the app
400{ "message": "Invalid App Details", "status": "error" }If app details are not found
Path Params
string
required

Unique identifier of the app.

Body Params
Headers
string
required

Your app token, please refer Get access token api to get the token from partner documentation.

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json