Skip to main content

User Inbox

Each user API request in TeleCMI platform includes user login token. After getting the user login token, make a POST request to the below base URL to retrieve the user SMS details.

Base URL

Send your POST method request with valid parameters, to the following base URL.

https://rest.telecmi.com/v2/inboxes

Required Parameters

These are the required POST method parameters with description

Parameter NameTypeDescription
tokenstringYour user token
fromnumberThe timestamp of from date and time in UTC timezone.
tonumberThe timestamp of to date and time in UTC timezone.
pagenumberThe Number of page per 10 record.
Note
All the above parameters are mandatory.

Sample JSON Request

Below is the following sample JSON POST method request

{
"token": "xxxx-xxxx-xxxx-xxxx",
"from": 1633050000000,
"to": 1637664168000,
"page": 1
}

Sample Response

If the provided information is valid, your web server will get a sample response from TeleCMI Platform as given below

{
"count": 2,
"sms": [
{
"msg": "Get 30% off on your total purchase!",
"read": 0,
"from": "12120000000",
"to": "19170000000",
"time": 1637672468000,
"msg_id": "5670d5b3-d5de-4553-a7f4-dbb302b33daf",
"type" : "sent"
},
{
"msg": "Your appointment is scheduled at 10 AM",
"read": 0,
"from": "12080000000",
"to": "12180000000",
"time": 1637672308000,
"msg_id": "98267b3-ascse-4bcb53-vsjs-b33dafdgfwebd",
"type" : "received"
}
],
"code": 200
}

Properties

These are the list of properties and its description

PropertyTypeDescription
msgstringThe SMS message Received
readnumberThe message read status. 0 - Unread, 1 - Read
fromstringThe number the message came from
tostringThe number of the user(agent)
timenumberTimestamp of the message in UTC timezone
msg_idstringA unique identifier of this message
typestringThe message type, it can be sent or received. sent - SMS sent by the user, received - SMS received to the user

HTTP status codes

TeleCMI API platform represents the following status code to identity the errors.

Status codeStatus TypeDescription
200SuccessWe received the request
404ErrorInvalid user token, Failed to authenticate token
400ErrorParameter missing