You can send text messages to your user.
You can pass the user information you want to send the message to api in the recipient object.
|appCustomerId||String||Customer id in your system||Optional|
|appStaffId||String||Your staff id.||Optional|
|id||String||Unique DLG user id.||Optional|
You can pass the the user information that will receive your message with this object. Your request should only have one of the properties that appCustomerId, appStaffId or id.
There are two unique id for a single user in the DLG platform One of them is DLG user id. This id is created randomly when user registering to the system. Besides of this id, according to the user type, one of the customer id or staff id are stored for the user in DLG.
As a result, you can use one of the customer id or staff id and DLG id in order to send message.
If you know the DLG user id, you can use it for customor or staff.
Using customer id and staff id is more applicable than using DLG user id. Because if you want to use DLG id, you should store all DLG user ids in your system.
|messageId||String||This is a unique id of your message. You should create it in your system and send it to api. If you don't create and sent it to api DLG will create it for you and send it to you in the response of your request. DLG platfrom will feed the events of the messages to your system by this id. You can use it to differenciate events by this id. Therefore, this id is important for following all events of your message by your system.||Optional|
|text||String||Text that will send to your user.||Yes|
|quickReplies||Array<quickReply>||This property is not used in the text message. It should be set as "quickReplies" : ||Yes|
|quickRepliesV2||Array<quickReplyV2>||This property is not used in the text message. It should be set as "quickRepliesV2" : ||Yes|
Successful API requests return the json object with the answer code http-2XX.
Response JSON object will have recipient id and message id properties. Recipient id will be the DLG user id. And message id will be the message id that is given with the request. If the request has not have any message id, DLG will create a message id and add it to response.
|recipient_id||String||DLG user id.|
|message_id||String||It is the id of the message sent to the user. If you have given a messageId in the request, this id will be sent back to you in this field. If you have not provided an id, the unique id created in the DLG system returns from this field.|