import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const numberLookups = await client.legacy.reporting.usageReports.numberLookup.list();
console.log(numberLookups.data);{
"data": [
{
"id": "9783f4d7-0bfc-427a-9d6b-bc659ad16e5b",
"start_date": "2025-11-01",
"end_date": "2025-12-01",
"aggregation_type": "ALL",
"status": "COMPLETE",
"report_url": "https://portal-cdrs-usage.s3.amazonaws.com/telco_data_usage_report_2025-12-02.csv",
"created_at": "2025-12-02T20:20:57.196925Z",
"updated_at": "2025-12-02T20:21:08.237091Z",
"managed_accounts": [],
"result": [
{
"user_id": "d37bdd47-f301-42ec-b2ad-5a0465bfb632",
"aggregations": [
{
"type": "CNAM",
"total_dips": 3,
"total_cost": 0.009,
"currency": "USD"
}
],
"record_type": "TelcoDataUsageRecord"
}
],
"record_type": "TelcoDataUsageReport"
}
],
"meta": {
"total_pages": 3,
"page_number": 2,
"total_results": 55,
"page_size": 25
}
}Retrieve a paginated list of telco data usage reports
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const numberLookups = await client.legacy.reporting.usageReports.numberLookup.list();
console.log(numberLookups.data);{
"data": [
{
"id": "9783f4d7-0bfc-427a-9d6b-bc659ad16e5b",
"start_date": "2025-11-01",
"end_date": "2025-12-01",
"aggregation_type": "ALL",
"status": "COMPLETE",
"report_url": "https://portal-cdrs-usage.s3.amazonaws.com/telco_data_usage_report_2025-12-02.csv",
"created_at": "2025-12-02T20:20:57.196925Z",
"updated_at": "2025-12-02T20:21:08.237091Z",
"managed_accounts": [],
"result": [
{
"user_id": "d37bdd47-f301-42ec-b2ad-5a0465bfb632",
"aggregations": [
{
"type": "CNAM",
"total_dips": 3,
"total_cost": 0.009,
"currency": "USD"
}
],
"record_type": "TelcoDataUsageRecord"
}
],
"record_type": "TelcoDataUsageReport"
}
],
"meta": {
"total_pages": 3,
"page_number": 2,
"total_results": 55,
"page_size": 25
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Successfully retrieved telco data usage reports
Show child attributes
Unique identifier for the report
"9783f4d7-0bfc-427a-9d6b-bc659ad16e5b"
Start date of the report period
"2025-11-01"
End date of the report period
"2025-12-01"
Type of aggregation used in the report
"ALL"
Current status of the report
"COMPLETE"
URL to download the complete report
"https://portal-cdrs-usage.s3.amazonaws.com/telco_data_usage_report_2025-12-02.csv"
Timestamp when the report was created
"2025-12-02T20:20:57.196925Z"
Timestamp when the report was last updated
"2025-12-02T20:21:08.237091Z"
List of managed account IDs included in the report
[]Array of usage records
Show child attributes
User ID
"d37bdd47-f301-42ec-b2ad-5a0465bfb632"
List of aggregations by lookup type
Show child attributes
Type of telco data lookup
"CNAM"
Total number of lookups performed
3
Total cost for this aggregation
0.009
Currency code
"USD"
Record type identifier
"TelcoDataUsageRecord"
Record type identifier
"TelcoDataUsageReport"
Was this page helpful?