import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const mdrUsageReport = await client.reports.mdrUsageReports.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(mdrUsageReport.data);{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_date": "2020-07-01T00:00:00-06:00",
"end_date": "2020-07-01T00:00:00-06:00",
"connections": [
123
],
"aggregation_type": "NO_AGGREGATION",
"status": "PENDING",
"report_url": "http://portal.telnyx.com/downloads/report_name_8hvb45Gu.csv",
"result": [
{
"cost": "0",
"direction": "outbound",
"product": "outbound",
"connection": "all",
"received": "0",
"delivered": "0",
"currency": "USD",
"parts": "0",
"sent": "0",
"profile_id": "All",
"tags": "All",
"message_type": "SMS",
"tn_type": "TF",
"carrier_passthrough_fee": "0"
}
],
"created_at": "2020-07-01T00:00:00-06:00",
"updated_at": "2020-07-01T00:00:00-06:00",
"profiles": "My profile",
"record_type": "mdr_usage_report"
}
}Delete messaging usage report by id
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const mdrUsageReport = await client.reports.mdrUsageReports.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(mdrUsageReport.data);{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_date": "2020-07-01T00:00:00-06:00",
"end_date": "2020-07-01T00:00:00-06:00",
"connections": [
123
],
"aggregation_type": "NO_AGGREGATION",
"status": "PENDING",
"report_url": "http://portal.telnyx.com/downloads/report_name_8hvb45Gu.csv",
"result": [
{
"cost": "0",
"direction": "outbound",
"product": "outbound",
"connection": "all",
"received": "0",
"delivered": "0",
"currency": "USD",
"parts": "0",
"sent": "0",
"profile_id": "All",
"tags": "All",
"message_type": "SMS",
"tn_type": "TF",
"carrier_passthrough_fee": "0"
}
],
"created_at": "2020-07-01T00:00:00-06:00",
"updated_at": "2020-07-01T00:00:00-06:00",
"profiles": "My profile",
"record_type": "mdr_usage_report"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Successful
Show child attributes
Identifies the resource
"2020-07-01T00:00:00-06:00"
"2020-07-01T00:00:00-06:00"
NO_AGGREGATION, PROFILE, TAGS PENDING, COMPLETE, FAILED, EXPIRED "http://portal.telnyx.com/downloads/report_name_8hvb45Gu.csv"
Show child attributes
"0"
"outbound"
"outbound"
"all"
"0"
"0"
"USD"
"0"
"0"
"All"
"All"
"SMS"
"TF"
"0"
"2020-07-01T00:00:00-06:00"
"2020-07-01T00:00:00-06:00"
"My profile"
"mdr_usage_report"
Was this page helpful?