MM Lite Send Message

Use this API to send MM Lite message.

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

Request Parameters

KeyDescriptionValueData TypesRequire/OptionalConstraints
AuthorizationAccess Token for the application{{PARTNER_APP_TOKEN}}StringRequiredShould be a valid Partner App Access Token
appIdApp ID to fetch the access token{{App_ID}}StringRequired
  • The Id should be a valid app Id of Gupshup.
  • The App must be associated with the account that owns the PARTNER_APP_TOKEN being used.
toto phone number where the message need to be sendStringRequiredMust be a valid phone no
templatemeta template payloadjsonRequiredThis endpoint only supports marketing template.
typeType in the value of what kind of message the user is sendingStringRequiredset it’s value as template
messaging_productMessaging product is a constant value i.e., whatsappStringRequired

Sample Request

curl --location 'https://partner.gupshup.io/partner/app/07c7c72d-20e3-4ff9-a5a1-14d1186eeec8/onboarding/marketing/msg' \
--header 'Authorization: sk_8eb35b1f81c24af293a405164a392f30' \
--header 'Content-Type: application/json' \
--data '{
    "recipient_type": "individual",
    "messaging_product": "whatsapp",
    "to": "918888998545",
    "type": "template",
    "template": {
        "language": {
            "policy": "deterministic",
            "code": "en"
        },
        "namespace": "5ff5f84e_789b_44df_80dd_6844d48a6a4a",
        "name": "cc_temp_prod",
        "components": [
            {
                "type": "body",
                "parameters": []
            },
            {
                "type": "button",
                "sub_type": "copy_code",
                "index": "0",
                "parameters": [
                    {
                        "type": "coupon_code",
                        "coupon_code": "250FF"
                    }
                ]
            },
            {
                "type": "button",
                "sub_type": "url",
                "index": "1",
                "parameters": [
                    {
                        "type": "text",
                        "text": "summer2023"
                    }
                ]
            },
            {
                "type": "button",
                "sub_type": "url",
                "index": "2",
                "parameters": [
                    {
                        "type": "text",
                        "text": "summer2023"
                    }
                ]
            }
        ]
    }
}'

Sample Response

{
  "messages": [
    {
      "id": "6ba08089-bdd1-487f-a29c-0c46056aa1f9"
    }
  ],
  "messaging_product": "whatsapp",
  "contacts": [
    {
      "input": "918888998545Value",
      "wa_id": "918888998545Value"
    }
  ]
}

Status Codes

Status CodeResponseComments
Success
200{ "messages": [ { "id": "6ba08089-bdd1-487f-a29c-0c46056aa1f9" } ], "messaging_product": "whatsapp", "contacts": [ { "input": "918888998545Value", "wa_id": "918888998545Value" } ] }
Error
400{ "status": "error", "message": "MM lite is not enabled for this app" }
400{ "status":"error", "message":"Unauthorised access to the resource. Please review request parameters and headers and retry" }
Path Params
string
required
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