Create an MDR request
POST/reporting/mdr_requests
Check the status and retrieve a MDR with a call to: GET/reporting/mdr_requests/{id}
- MDRs are available for 30 days
- The 'filters' field specifies a list of query criteria as follows:
'filters': [
\{
'filter_type': enum('and', 'or'),
'cli': string,
'cli_filter': enum('contains', 'starts_with', 'ends_with')
\},
\{
'filter_type': enum('and', 'or'),
'cld': string,
'cld_filter': enum('contains', 'starts_with', 'ends_with'),
\},
\{
'filter_type': enum('and', 'or'),
'tags_list': list of tag strings
\}
]
Note: The first object in the filter list must specify a filter_type of and
. You can not follow an
or
with another and
. Other than that, you can specify as many filters as you like in any order.
Request
- application/json
Body
required
MDR Request to add
UTC (2024-11-12T00:00:00+00:00)
UTC (2024-11-12T09:54:28+00:00). If end time includes the last 4 hours, some MDRs might not appear in this report, due to wait time for downstream message delivery confirmation. You can also leverage the Messaging API for a near real-time status.
Default value: 1
Inbound = 1, Outbound = 2
Default value: 1
Complete = 1, Incomplete = 2, Errors = 3
Default value: ``
Array of connection IDs
Default value: ``
Array of profile IDs
Default value: ``
Array of directions. Allowed directions: inbound, outbound
Default value: UTC
Timezone for the start_time and end_time
Responses
200: MDR Request response
- application/json
400: Bad request
401: Unauthorized
Request samples
curl -L 'https://api.telnyx.com/reporting/mdr_requests' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"start_time": "string",
"end_time": "string",
"call_types": [
0
],
"record_types": [
0
],
"connections": [
"string"
],
"profiles": [
"string"
],
"report_name": "string",
"filters": [
"string"
],
"directions": [
"string"
],
"timezone": "UTC"
}'
Response samples
{
"id": "string",
"start_time": "string",
"end_time": "string",
"call_types": [
0
],
"record_types": [
0
],
"connections": [
"string"
],
"report_name": "string",
"status": 1,
"report_url": "string",
"filters": "string",
"created_at": "string",
"updated_at": "string",
"profiles": "string"
}