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 Name | Type | Description |
---|---|---|
token | string | Your user token |
from | number | The timestamp of from date and time in UTC timezone. |
to | number | The timestamp of to date and time in UTC timezone. |
page | number | The 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
Property | Type | Description |
---|---|---|
msg | string | The SMS message Received |
read | number | The message read status. 0 - Unread, 1 - Read |
from | string | The number the message came from |
to | string | The number of the user(agent) |
time | number | Timestamp of the message in UTC timezone |
msg_id | string | A unique identifier of this message |
type | string | The 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 code | Status Type | Description |
---|---|---|
200 | Success | We received the request |
404 | Error | Invalid user token, Failed to authenticate token |
400 | Error | Parameter missing |