---
title: "Create a CSV download"
method: POST
path: "/phone_numbers/csv_downloads"
tags: ["CSV Downloads"]
---

# Create a CSV download

`POST /phone_numbers/csv_downloads`

## Query parameters

- `csv_format` 'V1' | 'V2'
- `filter` object
  - `has_bundle` string — Filter by phone number that have bundles.
  - `tag` string — Filter by phone number tags.
  - `connection_id` string — Filter by connection_id.
  - `phone_number` string — Filter by phone number. Requires at least three digits. Non-numerical characters will result in no values being returned.
  - `status` 'purchase-pending' | 'purchase-failed' | 'port-pending' | 'active' | 'deleted' | 'port-failed' | 'emergency-only' | 'ported-out' | 'port-out-pending' — Filter by phone number status.
  - `voice.connection_name` object — Filter by voice connection name pattern matching.
    - `contains` string — Filter contains connection name. Requires at least three characters.
    - `starts_with` string — Filter starts with connection name. Requires at least three characters.
    - `ends_with` string — Filter ends with connection name. Requires at least three characters.
    - `eq` string — Filter by connection name.
  - `voice.usage_payment_method` 'pay-per-minute' | 'channel' — Filter by usage_payment_method.
  - `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'.
  - `emergency_address_id` string — 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'.
  - `customer_reference` string — Filter numbers via the customer_reference set.

## Response `200`

Successful response with details about a CSV download.

- object
  - `data` CsvDownload[]
    - `id` string — Identifies the resource.
    - `record_type` string — Identifies the type of the resource.
    - `url` string — The URL at which the CSV file can be retrieved.
    - `status` 'pending' | 'complete' | 'failed' | 'expired' — Indicates the completion level of the CSV report. Only complete CSV download requests will be able to be retrieved.

## Other responses

- `400` — Bad request, the request was unacceptable, often due to missing a required parameter.
- `401` — Unauthorized
- `404` — The requested resource doesn't exist.
- `422` — Unprocessable entity. Check the 'detail' field in response for details.
- `500` — Unexpected error

---

[API](https://skmtc.net/team-telnyx/apis/telnyx-api-2.md) · [All operations](https://skmtc.net/team-telnyx/apis/telnyx-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/team-telnyx/telnyx-api-2/versions/8f5f4e537994/schema)
