post https://apps.applozic.com/rest/ws/message/dispatch
Description:
- Message Dispatch API behaves same as Message Send API and is only available to Application Bot users.
- Message Dispatch API supports one-to-one, group and contextual based messaging.
- Application Bot user can send Message on behalf of one user to another user on the back date also. (Used for data migration from your Server to Applozic Sever).
JSON required for One to One based messaging:
{
"message":"HI STEVE",
"senderName":"john",
"to": "steve"
}
Json Parameter Description:
Json Parameter | Required | Default | Description |
---|---|---|---|
senderName | Yes | unique Id of message sender user | |
to | Yes | unique Id of message receiver user | |
message | Yes | message content to be passed | |
oldTimestamp | No | create message timestamp |
Response:
{
"messageKey": "5-a97d66cd-67f9-42ba-aa61-a357455088ac-1456148218362",
"createdAt": 1456148218000
}
Response Parameter Description:
Response Parameters | Description |
---|---|
messageKey | message key |
createdAt | Time in miliseconds when response is return from server |
JSON required for group based messaging:
{
"message":"message content",
"groupId":114209 //groupId received while group creation.
}
Response:
{
"messageKey": "5-agpzfmFwcGxvemljchMLEgZTdVVzZXIYgICAgLrcvwsM-1464093115599",
"createdAt": 1456148218000
}
JSON required for contextual based messaging:
{
"message":"Hello, I am interested in the product, can we chat?",
"senderName":"john",
"to": "steve",
"conversationPxy": {
"topicId":"prodct topic Id",
"topicDetail": "topic detail string"
}
}
Response:
{
"messageKey":"5-a97d66cd-67f9-42ba-aa61-a357455088ac-1458039322283",
"conversationId":456,
"createdAt":1458039322000
}
Response Parameters | Description |
---|---|
messageKey | message key |
createdAt | Time in miliseconds when response is return from server |
conversationId | open conversation to chat on topic |