Send a message to the specified phone number via WhatsApp channel.
The phone number must be registered in WhatsApp.
If parameter withCase is true, the message will always be sent to an open case. If the user already has an open case, the message will be sent to that case. Otherwise, a new case will be created for the user.
Headers
Request Body
HTTP/1.1 200 OK
{
"status": 200,
"error": {
"code": "",
"message": "",
"field": ""
},
"data": {
"success": true,
"message": "The message has been added to queue",
"caseID": "96212160DF"
}
}
40002 (ParamValidationFailed): The parameter validation failed.
HTTP/1.1 200 OK
{
"status": 400,
"error": {
"code": "40002",
"message": "Channel ID is required",
"field": "channelID"
},
"data": {}
}
40002 (HeaderValidationFailed): The request header validation failed.
HTTP/1.1 200 OK
{
"status": 400,
"error": {
"code": "40001",
"message": "Request headers are required (API-Key)",
"field": ""
},
"data": {}
}
49900 (TierNotSelected): The organization has not selected the tier.
HTTP/1.1 200 OK
{
"status": 499,
"error": {
"code": "49900",
"message": "Please select a tier",
"field": ""
},
"data": {}
}
Click the right arrowabove on the right side of Sync User Contact API to see the full list of request parameters and the response.
Channel ID can be obtained in OneTalk Dashboard
Go to Integration and click WhatsApp for SME, then click the channel detail and you can copy the Channel ID
{"channelID": "2101081881","phone": "6281212345678","messageType": "text","body": "Hi, this is a message.","withCase": true,"topicID": 1}
{"channelID": "2101081881","phone": "6281212345678","messageType": "image","body": "http://www.example.com/chat/file/image/008dce72-06c0?token=802714","filename": "my-photo.jpg","caption": "This is the photo.","withCase": true,"topicID": 1}
Send a templated message to the specified phone number via a WhatsApp Business API channel.
The phone number must be registered in WhatsApp.
If parameter withCase is true, the message will always be sent to an open case. If the user already has an open case, the message will be sent to that case. Otherwise, a new case will be created for the user.
Headers
Request Body
HTTP/1.1200 OK{"status":200,"error": {"code":"","message":"","field":"" },"data": {"success":true,"message":"The message has been added to queue","caseID":"96212160DF" }}
HTTP/1.1200 OK{"status":400,"error": {"code":"40002","message":"Channel ID is required","field":"channelID" },"data": {}}HTTP/1.1200 OK{"status":400,"error": {"code":"40001","message":"Request headers are required (API-Key)","field":"" },"data": {}}HTTP/1.1200 OK{"status":499,"error": {"code":"49900","message":"Please select a tier","field":"" },"data": {}}
Click the right arrowabove on the right side of Sync User Contact API to see the full list of request parameters and the response.
Channel ID can be seen in OneTalk Dashboard
Go to Integration and click WhatsApp Business API, then click the channel detail and you can copy the Channel ID
{"channelID":"2100480937","phoneNumberID":"103011859190563","phone":"6281212345678","templateName":"greetings_v1","languageCode":"en","parameters": {"header": [//Text Template Type, Header with Variable {"name":"variable_name","value":"Good Morning" },//Dynamic Media Template Type, Media Type "Document" {"name":"document","value":"https://taptalk.io/file_path_url.pdf" },//Dynamic Media Template Type, Media Type "Image" {"name":"image","value":"https://taptalk.io/file_path_url.pdf" },//Dynamic Media Template Type, Media Type "Video" {"name":"video","value":"https://taptalk.io/file_path_url.pdf" }, ],"body": [ {"name":"name","value":"John" }, {"name":"office_hours","value":"09:00 - 17:00" } ],"footer": [],"buttons": [ {"name":"url_0","value":"1d-1" } ] },"withCase":true,"topicID":1}
40002 (ParamValidationFailed): The parameter validation failed.HTTP/1.1200OK{"status": 400,"error": {"code":"40002","message":"Since timestamp is invalid","field":"since_timestamp" },"data": {}}40002 (HeaderValidationFailed): The request header validation failed.HTTP/1.1200OK{"status": 400,"error": {"code":"40001","message":"Request headers are required (API-Key)","field":"" },"data": {}}49900 (TierNotSelected): The organization has not selected the tier.HTTP/1.1200OK{"status": 499,"error": {"code":"49900","message":"Please select a tier","field":"" },"data": {}}
Click the right arrowabove on the right side of Get Updated Case List API to see the full list of request parameters and the response.