Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{
    "scenarioKey": "CC9F01A5DC7BEE2C2B829D203482A654",
    "destinations": [
        {
            "to": {
                "phoneNumber": "41793026727"
            }
        }
    ],
    "whatsApp": {
        "text": "File caption",
        "fileUrl": "https://www.documentUrl.com"
    }
}	

Template text message  

If you would like to send a template text message, please check the example provided below. 

Code Block
languagejson
{
    "scenarioKey": "CC9F01A5DC7BEE2C2B829D203482A654",
    "destinations": [
        {
            "to": {
                "phoneNumber": "41793026727"
            }
        }
    ],
    "whatsApp": {
        "templateName ": "template_5",
        "templateData ": ["John", "5"],
        "language" : "en_GB"
    }
}

Template image message

If you would like to send a template image message, please check the example provided below. 

Code Block
languagejson
{
    "scenarioKey": "CC9F01A5DC7BEE2C2B829D203482A654",
    "destinations": [
        {
            "to": {
                "phoneNumber": "41793026727"
            }
        }
    ],
    "whatsApp": {
        "templateName ": "template_5",
        "mediaTemplateData" : {
          "header": {
            "imageUrl": "https://url_to_download_image"
          },
          "body": {
            "placeholders": ["John", "5"]
          }
        },
        "language" : "en_GB"
    }
}

Template document message

If you would like to send a template document message, please check the example provided below. 

Code Block
languagejson
{
    "scenarioKey": "CC9F01A5DC7BEE2C2B829D203482A654",
    "destinations": [
        {
            "to": {
                "phoneNumber": "41793026727"
            }
        }
    ],
    "whatsApp": {
        "templateName ": "template_5",
        "mediaTemplateData" : {
          "header": {
            "documentUrl": "https://url_to_download_document",
            "documentFilename": "myFile.pdf"
          },
          "body": {
            "placeholders": ["John", "5"]
          }
        },
        "language" : "en_GB"
    }
}

Delivery Message

CTLive can be informed about the delivery status of outbound messages posting the following URL https://<hostname>/imchannel/message

...