Create a CSV download
POST/phone_numbers/csv_downloads
Create a CSV download
Request
Query Parameters
Possible values: [V1
, V2
]
Default value: V1
Which format to use when generating the CSV file. The default for backwards compatibility is 'V1'
Filter by phone number that have bundles.
Filter by phone number tags.
Filter by connection_id.
Filter by phone number. Requires at least three digits. Non-numerical characters will result in no values being returned.
Possible values: [purchase-pending
, purchase-failed
, port-pending
, active
, deleted
, port-failed
, emergency-only
, ported-out
, port-out-pending
]
Filter by phone number status.
Filter contains connection name. Requires at least three characters.
Possible values: [pay-per-minute
, channel
]
Filter by usage_payment_method.
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'.
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'.
Filter numbers via the customer_reference set.
Responses
200: Successful response with details about a CSV download.
- application/json
default: Unexpected error
- application/json
Request samples
curl -L -X POST 'https://api.telnyx.com/v2/phone_numbers/csv_downloads' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
Response samples
{
"data": [
{
"id": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7",
"record_type": "csv_download",
"url": "https://www.telnyx.com/sample/42587e44-3a3e-46de-9255-0c9a7a1d1ec7",
"status": "pending"
}
]
}
{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "string"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}