...
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 |
---|
|
{
"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 |
---|
|
{
"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 |
---|
|
{
"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>/imchanneimchannel/message
Code Block |
---|
{
"results": [{
"bulkId": "",
"status": {
"id": 5,
"groupId": 3,
"groupName": "DELIVERED",
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"messageId": "fb469d73-d362-463f-b30f-1e959b53badc",
"doneAt": "2019-04-09T16:01:56.494-0300",
"sentAt": "2019-04-09T16:00:58.647-0300",
"to": "41793026731",
"channel": "WHATSAPP"
}]
} |
...
CTLive can be informed about the seen status of outbound messages posting the following URL https://<hostname>/imchanneimchannel/message
Code Block |
---|
{
"results": [
{
"messageId": "1215f543ab19-345f-adbd-12ad31451ed25f35",
"to": "41793026731",
"sentAt": "2018-12-12T11:21:57.793+0000",
"seenAt": "2018-12-12T11:21:58.251+0000"
}
]
} |