Skip to main content

Create a CSV download

POST 
/phone_numbers/csv_downloads

Create a CSV download

Request

Query Parameters

    csv_format string

    Possible values: [V1, V2]

    Default value: V1

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

    filter[has_bundle] string

    Filter by phone number that have bundles.

    filter[tag] string

    Filter by phone number tags.

    filter[connection_id] int64

    Filter by connection_id.

    filter[phone_number] string

    Filter by phone number. Requires at least three digits. Non-numerical characters will result in no values being returned.

    filter[status] string

    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[voice.connection_name][contains] string

    Filter contains connection name. Requires at least three characters.

    filter[voice.usage_payment_method] string

    Possible values: [pay-per-minute, channel]

    Filter by usage_payment_method.

    filter[billing_group_id] string

    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[emergency_address_id] int64

    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[customer_reference] string

    Filter numbers via the customer_reference set.

Responses

200: Successful response with details about a CSV download.

default: Unexpected error

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"
}
]
}