sendExternalTextMessageToActiveChat
Sends a text message to an active whatsapp chat.
HTTP POST /livechat/:domain/sendExternalTextMessageToActiveChat
Path Variables:
Name | Mandatory | Type | Description |
---|---|---|---|
domain | NO | STRING | Unique domain identifier |
Authorization: see Authentication mechanisms
Request Body:
Type: JSON
Name | Mandatory | Type | Description |
---|---|---|---|
userid | YES | STRING | customer phone number |
serviceid | YES | STRING | service phone number |
text | YES | STRING | Text message to send in chat |
chatid | yes | STRING | Unique chat identifier |
Response:
Type: JSON
Name | Type | Description |
---|---|---|
result | BOOLEAN | If true, the service response was performed correctly |
error | NULL / STRING | Contains the error description if an error has occurred in the request |
Example:
Request
http://<hostname>:<port>/livechat/default/sendExternalTextMessageToActiveChat
Request body
{
"userid": "393393790817",
"serviceid": "447491163403",
"chatid":"CHAT_DEFAULT_ac771534-0b29-4b0e-a2f9-3ba7628c0580",
"text":"message from external web service"
}
Response
{
"result": true,
"error": null
}
Â