MDR Usage Reports API

MDR Usage Reports API

MDR Usage Get

Fetch all messaging usage reports. Usage reports are aggregated messaging data for specified time period and breakdown

SecuritybearerAuth
Request
query Parameters
page[number]
integer <int32>
Default: 1

Page number

page[size]
integer <int32>
Default: 20

Size of the page

Responses
200

Successful

Response Schema: application/json
Array of objects (MdrUsageReportResponse)
object (PaginationMeta)
get/reports/mdr_usage_reports
Request samples
Response samples
application/json
{
  • "data": [
    • {
      • "aggregation_type": "NO_AGGREGATION",
      • "connections": [
        • 0
        ],
      • "created_at": "2020-07-01T00:00:00-06:00",
      • "end_date": "2020-07-01T00:00:00-06:00",
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "profiles": "My profile",
      • "record_type": "mdr_usage_report",
      • "result": [
        • {
          • "carrier_passthrough_fee": "0",
          • "connection": "all",
          • "cost": "0",
          • "currency": "USD",
          • "delivered": "0",
          • "direction": "outbound",
          • "message_type": "SMS",
          • "parts": "0",
          • "product": "outbound",
          • "profile_id": "All",
          • "received": "0",
          • "sent": "0",
          • "tags": "All",
          • "tn_type": "TF"
          }
        ],
      • "start_date": "2020-07-01T00:00:00-06:00",
      • "status": "PENDING",
      • "updated_at": "2020-07-01T00:00:00-06:00"
      }
    ],
  • "meta": {
    • "page_number": 2,
    • "page_size": 25,
    • "total_pages": 3,
    • "total_results": 55
    }
}

MDR USage Post

Submit request for new new messaging usage report. This endpoint will pull and aggregate messaging data in specified time period.

SecuritybearerAuth
Request
Request Body schema: */*
required

Mdr usage report data

aggregation_type
required
string
Enum: "NO_AGGREGATION" "PROFILE" "TAGS"
end_date
required
string <date-time>
profiles
string
start_date
required
string <date-time>
Responses
200

Successful

Response Schema: application/json
object (MdrUsageReportResponse)
aggregation_type
string
Enum: "NO_AGGREGATION" "PROFILE" "TAGS"
connections
Array of integers <int64>
created_at
string <date-time>
end_date
string <date-time>
id
string <uuid>

Identifies the resource

profiles
string
record_type
string
report_url
string
Array of objects (MdrUsageRecord)
start_date
string <date-time>
status
string
Enum: "PENDING" "COMPLETE" "FAILED" "EXPIRED"
updated_at
string <date-time>
post/reports/mdr_usage_reports
Request samples
Response samples
application/json
{
  • "data": {
    • "aggregation_type": "NO_AGGREGATION",
    • "connections": [
      • 0
      ],
    • "created_at": "2020-07-01T00:00:00-06:00",
    • "end_date": "2020-07-01T00:00:00-06:00",
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "profiles": "My profile",
    • "record_type": "mdr_usage_report",
    • "result": [
      • {
        • "carrier_passthrough_fee": "0",
        • "connection": "all",
        • "cost": "0",
        • "currency": "USD",
        • "delivered": "0",
        • "direction": "outbound",
        • "message_type": "SMS",
        • "parts": "0",
        • "product": "outbound",
        • "profile_id": "All",
        • "received": "0",
        • "sent": "0",
        • "tags": "All",
        • "tn_type": "TF"
        }
      ],
    • "start_date": "2020-07-01T00:00:00-06:00",
    • "status": "PENDING",
    • "updated_at": "2020-07-01T00:00:00-06:00"
    }
}

MDR Sync Get

Generate and fetch messaging usage report synchronously. This endpoint will both generate and fetch the messaging report over a specified time period. No polling is necessary but the response may take up to a couple of minutes.

SecuritybearerAuth
Request
query Parameters
start_date
string <date-time>
Example: start_date=2020-07-01T00:00:00-06:00
end_date
string <date-time>
Example: end_date=2020-07-01T00:00:00-06:00
aggregation_type
required
string
Enum: "NO_AGGREGATION" "PROFILE" "TAGS"
Example: aggregation_type=profile
profiles
Array of strings
Example: profiles=My profile
Responses
200

Successful

Response Schema: application/json
object (MdrUsageReportResponse)
aggregation_type
string
Enum: "NO_AGGREGATION" "PROFILE" "TAGS"
connections
Array of integers <int64>
created_at
string <date-time>
end_date
string <date-time>
id
string <uuid>

Identifies the resource

profiles
string
record_type
string
report_url
string
Array of objects (MdrUsageRecord)
start_date
string <date-time>
status
string
Enum: "PENDING" "COMPLETE" "FAILED" "EXPIRED"
updated_at
string <date-time>
get/reports/mdr_usage_reports/sync
Request samples
Response samples
application/json
{
  • "data": {
    • "aggregation_type": "NO_AGGREGATION",
    • "connections": [
      • 0
      ],
    • "created_at": "2020-07-01T00:00:00-06:00",
    • "end_date": "2020-07-01T00:00:00-06:00",
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "profiles": "My profile",
    • "record_type": "mdr_usage_report",
    • "result": [
      • {
        • "carrier_passthrough_fee": "0",
        • "connection": "all",
        • "cost": "0",
        • "currency": "USD",
        • "delivered": "0",
        • "direction": "outbound",
        • "message_type": "SMS",
        • "parts": "0",
        • "product": "outbound",
        • "profile_id": "All",
        • "received": "0",
        • "sent": "0",
        • "tags": "All",
        • "tn_type": "TF"
        }
      ],
    • "start_date": "2020-07-01T00:00:00-06:00",
    • "status": "PENDING",
    • "updated_at": "2020-07-01T00:00:00-06:00"
    }
}

MDR Usage Delete

Delete messaging usage report by id

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>
Responses
200

Successful

Response Schema: application/json
object (MdrUsageReportResponse)
aggregation_type
string
Enum: "NO_AGGREGATION" "PROFILE" "TAGS"
connections
Array of integers <int64>
created_at
string <date-time>
end_date
string <date-time>
id
string <uuid>

Identifies the resource

profiles
string
record_type
string
report_url
string
Array of objects (MdrUsageRecord)
start_date
string <date-time>
status
string
Enum: "PENDING" "COMPLETE" "FAILED" "EXPIRED"
updated_at
string <date-time>
delete/reports/mdr_usage_reports/{id}
Request samples
Response samples
application/json
{
  • "data": {
    • "aggregation_type": "NO_AGGREGATION",
    • "connections": [
      • 0
      ],
    • "created_at": "2020-07-01T00:00:00-06:00",
    • "end_date": "2020-07-01T00:00:00-06:00",
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "profiles": "My profile",
    • "record_type": "mdr_usage_report",
    • "result": [
      • {
        • "carrier_passthrough_fee": "0",
        • "connection": "all",
        • "cost": "0",
        • "currency": "USD",
        • "delivered": "0",
        • "direction": "outbound",
        • "message_type": "SMS",
        • "parts": "0",
        • "product": "outbound",
        • "profile_id": "All",
        • "received": "0",
        • "sent": "0",
        • "tags": "All",
        • "tn_type": "TF"
        }
      ],
    • "start_date": "2020-07-01T00:00:00-06:00",
    • "status": "PENDING",
    • "updated_at": "2020-07-01T00:00:00-06:00"
    }
}

MDR Usage Fetch

Fetch a single messaging usage report by id

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>
Responses
200

Successful

Response Schema: application/json
object (MdrUsageReportResponse)
aggregation_type
string
Enum: "NO_AGGREGATION" "PROFILE" "TAGS"
connections
Array of integers <int64>
created_at
string <date-time>
end_date
string <date-time>
id
string <uuid>

Identifies the resource

profiles
string
record_type
string
report_url
string
Array of objects (MdrUsageRecord)
start_date
string <date-time>
status
string
Enum: "PENDING" "COMPLETE" "FAILED" "EXPIRED"
updated_at
string <date-time>
get/reports/mdr_usage_reports/{id}
Request samples
Response samples
application/json
{
  • "data": {
    • "aggregation_type": "NO_AGGREGATION",
    • "connections": [
      • 0
      ],
    • "created_at": "2020-07-01T00:00:00-06:00",
    • "end_date": "2020-07-01T00:00:00-06:00",
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "profiles": "My profile",
    • "record_type": "mdr_usage_report",
    • "result": [
      • {
        • "carrier_passthrough_fee": "0",
        • "connection": "all",
        • "cost": "0",
        • "currency": "USD",
        • "delivered": "0",
        • "direction": "outbound",
        • "message_type": "SMS",
        • "parts": "0",
        • "product": "outbound",
        • "profile_id": "All",
        • "received": "0",
        • "sent": "0",
        • "tags": "All",
        • "tn_type": "TF"
        }
      ],
    • "start_date": "2020-07-01T00:00:00-06:00",
    • "status": "PENDING",
    • "updated_at": "2020-07-01T00:00:00-06:00"
    }
}