Here is an example call sequence to import messages.
For each chat/dialog, you need to obtain a
sessionidparameter first. For this, send a message without content to the user’s extension and get asessionidin response. For example:
POST https://shell.ringotel.co/api
{
"method": "message",
"params":{
"orgid": "16287540703457500320",
"from": "1234567890,
"to": "502"
}
} Response:
“result”: {
"sessionid": "1710004869211-d3103a34bd2ce6023a"
}
2. Create messages by sending the message API method with the "sessionid", "content" and "timestamp" parameters.
3. Repeat 1 and 2 for each party number.
4. Repeat 1, 2 and 3 for each user.
Messages with provided "sessionid" value are marked as read after importing.
timestamp field takes a number value in milliseconds since 01.01.1970
