Send WhatsApp Notifications

In this section, you'll learn how to send a new WhatsApp based notification using our programmable APIs.

Sample Code

curl --location --request POST 'https://gateway.konverse.ai/ironman/api/v1/whatsApp/whatsappHSM' \
--header 'x-app-id: your app id' \
--header 'x-api-key: your app key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "message": {
     "to": "919XXXXXXXXX",
     "templateName" : "message1",
     "language" : "<language-code>",
     "parameters": [
         "parameter1",
         "parameter2"
      ],
      "buttons" : []
   }
}'

Step 1 - Authentication

Authentication of our WhatsApp API is done using the two request headers, <x-app-id> & <x-api-key>. Connect to our development team for your ID & Key.

Step 2 - Using the API

Once your template is approved by WhatsApp & you've app ID & key, copy and paste the above cURL request with your credential and start testing.

WhatsApp Notification Sending API

POST https://gateway.konverse.ai/ironman/api/v1/whatsappHSM

Headers

Request Body

{
    "status": "success",
    "message": "message sent successfully",
    "messageId": "gBEGkXdgloBAAgluX2iGtsi"
}

Template with dynamic CTA URL buttons & File

curl --location --request POST 'https://gateway.konverse.ai/ironman/api/v1/whatsApp/whatsappHSM' \
--header 'x-app-id: your app id' \
--header 'x-api-key: your app key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "message": {
        "to": "1XXXXXXXX",
        "templateName": "<templatename>",
        "parameters": [
            <parameters>
        ],
        "file": {
            "type": "<document|image|video|audio>",
            "url": "<url - must end with .pdf/.doc/.png/.jpg>"
        },
        "buttons": [
            {
                "type": "url",
                "text": "<url parameter>"
            }
        ]
    }
}'

Last updated