Skip to main content

Import Messages from another platform using Ringotel API

Alex Brainin avatar
Written by Alex Brainin
Updated over a week ago

Here is an example call sequence to import messages.

  1. For each chat/dialog, you need to obtain a sessionid parameter first. For this, send a message without content to the user’s extension and get a sessionid in 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

Did this answer your question?