Incoming Answered
Each API request in TeleCMI platform includes App id and secret. Get your App id and secret in TeleCMI dashboard. After getting the app id and secret, make a POST request to the below base URL to retrieve the incoming answered call details.
Base URL
Send your POST method request with valid parameters, to the following base URL.
https://rest.telecmi.com/v2/answered
Sample JSON Request
Below is the following sample JSON POST method request.
{
"appid": 1111112,
"secret": "xxxx-xxxx-xxxx-xxx",
"start_date": 1569911400000,
"end_date": 1570167249853,
"page": 2,
"limit": 5
}
Required Parameters
These are the required POST method parameters with a description.
Parameter Name | Type | Description |
---|---|---|
*appid | number | Your app id. |
*secret | string | Your app secret |
start_date | number | The timestamp of start date and time in UTC timezone. By default the timestamp will be last 24 hours from current time. |
end_date | number | The timestamp of end date and time in UTC timezone. By default the timestamp will be current time. |
page | number | As a default, the first page will be displayed, and each page will have 10 records. |
limit | number | The number of records per request is 10 by default limit, but can be increased to a maximum limit of 20. |
Note
The * marked parameter is mandatory.
Sample Response
If the provided information is valid, your web server will get a sample response from the TeleCMI Platform as given below.
{
"count": 44,
"cdr": [
{
"cmiuid": "0a562832-ac7c-48c6-8847-47c8bf2a0b7d",
"duration": 67,
"agent": "201_1111112",
"notes": [
{
"msg": "Support Query",
"date": 1652105272029,
"agent": "201_1111112"
}
],
"billedsec": 61,
"filename": "1652085467968095564833_1111112.mp3",
"rate": 0,
"record": "true",
"name": "unknown",
"from": 919000000001,
"to": 919999999999,
"time": 1652105272029
},
{
"cmiuid": "a82aa3f7-612e-4d1e-ac72-e01596821aa6",
"duration": 12,
"agent": "201_1111112",
"billedsec": 5,
"filename": "1652085400066998455529_1111112.mp3",
"rate": 0,
"record": "true",
"name": "unknown",
"from": 919000000002,
"to": 919999999999,
"time": 1652105226229
},
{
"cmiuid": "6981a6bd-3976-4d91-89a4-fd9f34864d1f",
"duration": 26,
"agent": "302_1111112",
"billedsec": 15,
"filename": "1650691149119666653130_1111112.mp3",
"rate": 0,
"record": "true",
"name": "unknown",
"from": 919000000003,
"to": 919999999999,
"time": 1650710975163
},
{
"cmiuid": "9595318c-eeca-450f-82cc-c9c5d62689bc",
"duration": 20,
"agent": "302_1111112",
"billedsec": 10,
"filename": "1650614642419333693605_1111112.mp3",
"rate": 0,
"record": "true",
"name": "unknown",
"from": 19170000000,
"to": 919999999999,
"time": 1650634485622
},
{
"cmiuid": "5554e620-3d6c-4ec7-834c-0d48525bfd61",
"duration": 9,
"agent": "302_1111112",
"notes": [
{
"msg": "Technical Support Query",
"date": 1650625184759,
"agent": "302_1111112"
}
],
"billedsec": 6,
"filename": "1650605361538103755626_1111112.mp3",
"rate": 0,
"record": "true",
"name": "unknown",
"from": 19170000001,
"to": 919999999999,
"time": 1650625184759
}
],
"code": 200
}
Properties
This is the list of properties and their descriptions.
Property | Type | Description |
---|---|---|
count | number | The total count of call detail record(cdr). |
cdr | JSON array | The list of total cdr in detail. |
cmiuid | string | A unique identifier for the call. |
duration | number | The total duration of the call in seconds when it was initiated. |
agent | string | A unique ID of the user. |
notes | JSON array | The entire notes information of the caller or calle. |
msg | string | The notes information of the caller or calle. |
date | number | A timestamp indicates the time the notes were added in the UTC timezone. |
agent | string | The user ID of the added notes. |
billedsec | number | The total duration of the call in seconds when it was answered. |
filename | string | The file name of the recorded conversation. |
rate | string | The calling cost of the phone call. |
record | string | If the record is enabled, it shows the status as true. |
name | string | The name of the caller. |
from | number | The call was made from this number. |
to | number | The user phone number. |
time | number | A timestamp indicates the time the call was answered in the UTC timezone. |
HTTP status codes
The TeleCMI API platform represents the following status code to identify the errors.
Status code | Status code | Description |
---|---|---|
200 | OK | There was a successful response to your request. |
404 | Error | Authentication Failed. |
400 | Error | Parameter missing. |