import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const csvDownload = await client.phoneNumbers.csvDownloads.create();
console.log(csvDownload.data);{
"data": [
{
"id": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7",
"record_type": "csv_download",
"url": "https://www.telnyx.com/sample/42587e44-3a3e-46de-9255-0c9a7a1d1ec7",
"status": "pending"
}
]
}import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const csvDownload = await client.phoneNumbers.csvDownloads.create();
console.log(csvDownload.data);{
"data": [
{
"id": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7",
"record_type": "csv_download",
"url": "https://www.telnyx.com/sample/42587e44-3a3e-46de-9255-0c9a7a1d1ec7",
"status": "pending"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Which format to use when generating the CSV file. The default for backwards compatibility is 'V1'
V1, V2 "V2"
Consolidated filter parameter (deepObject style). Originally: filter[has_bundle], filter[tag], filter[connection_id], filter[phone_number], filter[status], filter[voice.connection_name], filter[voice.usage_payment_method], filter[billing_group_id], filter[emergency_address_id], filter[customer_reference]
Show child attributes
Filter by phone number that have bundles.
Filter by phone number tags.
Filter by connection_id.
"1521916448077776306"
Filter by phone number. Requires at least three digits. Non-numerical characters will result in no values being returned.
Filter by phone number status.
purchase-pending, purchase-failed, port-pending, active, deleted, port-failed, emergency-only, ported-out, port-out-pending "active"
Filter by voice connection name pattern matching.
Show child attributes
Filter contains connection name. Requires at least three characters.
"test"
Filter starts with connection name. Requires at least three characters.
"test"
Filter ends with connection name. Requires at least three characters.
"test"
Filter by connection name.
"test"
Filter by usage_payment_method.
pay-per-minute, channel "channel"
Filter by the billing_group_id associated with phone numbers. To filter to only phone numbers that have no billing group associated them, set the value of this filter to the string 'null'.
"62e4bf2e-c278-4282-b524-488d9c9c43b2"
Filter by the emergency_address_id associated with phone numbers. To filter only phone numbers that have no emergency address associated with them, set the value of this filter to the string 'null'.
"9102160989215728032"
Filter numbers via the customer_reference set.
Successful response with details about a CSV download.
Show child attributes
Identifies the resource.
"42587e44-3a3e-46de-9255-0c9a7a1d1ec7"
Identifies the type of the resource.
"csv_download"
The URL at which the CSV file can be retrieved.
"https://www.telnyx.com/sample/42587e44-3a3e-46de-9255-0c9a7a1d1ec7"
Indicates the completion level of the CSV report. Only complete CSV download requests will be able to be retrieved.
pending, complete, failed, expired "pending"
Was this page helpful?