MDR Reports V1

MDR Report operations

Create an MDR request

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
Request Body schema: application/json
required

MDR Request to add

start_time
required
string

UTC (2022-07-29T00:00:00+00:00)

end_time
string

UTC (2022-07-29T06:21:27+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.

call_types
Array of integers
Default: [1]

Inbound = 1, Outbound = 2

record_types
required
Array of integers
Default: [1]

Complete = 1, Incomplete = 2, Errors = 3

connections
required
Array of strings
Default: []

Array of connection IDs

profiles
Array of strings
Default: []

Array of profile IDs

report_name
string
filters
Array of strings
directions
required
Array of strings
Default: []

Array of directions. Allowed directions: inbound, outbound

timezone
string
Default: "UTC"

Timezone for the start_time and end_time

Responses
200

MDR Request response

Response Schema: application/json
id
required
string
start_time
required
string

UTC (2022-07-29T00:00:00+00:00)

end_time
required
string

UTC (2022-07-29T06:21:27+00:00)

call_types
required
Array of integers
Default: [1]

Inbound = 1, Outbound = 2

record_types
required
Array of integers
Default: [1]

Complete = 1, Incomplete = 2, Errors = 3

connections
required
Array of strings

Array of connection IDs

report_name
required
string
status
required
integer
Default: 1

Pending = 1, Complete = 2, Failed = 3, Expired = 4

report_url
required
string

Link to report

filters
required
string

Search criteria

created_at
required
string
updated_at
required
string
profiles
string
400

Bad request

401

Unauthorized

post/reporting/mdr_requests
Request samples
application/json
{
  • "start_time": "string",
  • "end_time": "string",
  • "call_types": [
    • 1
    ],
  • "record_types": [
    • 1
    ],
  • "connections": [ ],
  • "profiles": [ ],
  • "report_name": "string",
  • "filters": [
    • "string"
    ],
  • "directions": [ ],
  • "timezone": "UTC"
}
Response samples
application/json
{
  • "id": "string",
  • "start_time": "string",
  • "end_time": "string",
  • "call_types": [
    • 1
    ],
  • "record_types": [
    • 1
    ],
  • "connections": [
    • "string"
    ],
  • "report_name": "string",
  • "status": 1,
  • "report_url": "string",
  • "filters": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "profiles": "string"
}

List all MDR requests

Returns a list of your MDR requests.

Request
query Parameters
page
integer
Default: 1

Page number of results to load

per_page
integer <= 1000
Default: 100

Number of results per page

Responses
200

Mdr Request response

Response Schema: application/json
Array
id
required
string
start_time
required
string

UTC (2022-07-29T00:00:00+00:00)

end_time
required
string

UTC (2022-07-29T06:21:27+00:00)

call_types
required
Array of integers
Default: [1]

Inbound = 1, Outbound = 2

record_types
required
Array of integers
Default: [1]

Complete = 1, Incomplete = 2, Errors = 3

connections
required
Array of strings

Array of connection IDs

report_name
required
string
status
required
integer
Default: 1

Pending = 1, Complete = 2, Failed = 3, Expired = 4

report_url
required
string

Link to report

filters
required
string

Search criteria

created_at
required
string
updated_at
required
string
profiles
string
401

Unauthorized

get/reporting/mdr_requests
Request samples
Response samples
application/json
[
  • {
    • "id": "string",
    • "start_time": "string",
    • "end_time": "string",
    • "call_types": [
      • 1
      ],
    • "record_types": [
      • 1
      ],
    • "connections": [
      • "string"
      ],
    • "report_name": "string",
    • "status": 1,
    • "report_url": "string",
    • "filters": "string",
    • "created_at": "string",
    • "updated_at": "string",
    • "profiles": "string"
    }
]

Retrieve MDR request status

Retrieve the status of an MDR request. Response includes a link to the report once it is generated.

Request
path Parameters
id
required
string

ID of MDR Request to retrieve

Responses
200

mdr_request

Response Schema: application/json
id
required
string
start_time
required
string

UTC (2022-07-29T00:00:00+00:00)

end_time
required
string

UTC (2022-07-29T06:21:27+00:00)

call_types
required
Array of integers
Default: [1]

Inbound = 1, Outbound = 2

record_types
required
Array of integers
Default: [1]

Complete = 1, Incomplete = 2, Errors = 3

connections
required
Array of strings

Array of connection IDs

report_name
required
string
status
required
integer
Default: 1

Pending = 1, Complete = 2, Failed = 3, Expired = 4

report_url
required
string

Link to report

filters
required
string

Search criteria

created_at
required
string
updated_at
required
string
profiles
string
401

Unauthorized

404

Resource not found

get/reporting/mdr_requests/{id}
Request samples
Response samples
application/json
{
  • "id": "string",
  • "start_time": "string",
  • "end_time": "string",
  • "call_types": [
    • 1
    ],
  • "record_types": [
    • 1
    ],
  • "connections": [
    • "string"
    ],
  • "report_name": "string",
  • "status": 1,
  • "report_url": "string",
  • "filters": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "profiles": "string"
}

Delete an MDR Request

Permanently deletes an MDR Request.

Request
path Parameters
id
required
string

ID of MDR Request to delete

Responses
200

MDR Request delete response

Response Schema: application/json
success
required
boolean
message
required
string
401

Unauthorized

404

Resource not found

delete/reporting/mdr_requests/{id}
Request samples
Response samples
application/json
{
  • "success": true,
  • "message": "string"
}