Skip to main content
POST
/
phone_numbers
/
csv_downloads
JavaScript
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"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

csv_format
enum<string>
default:V1

Which format to use when generating the CSV file. The default for backwards compatibility is 'V1'

Available options:
V1,
V2
Example:

"V2"

filter
object

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]

Response

Successful response with details about a CSV download.

data
object[]