Skip to main content
GET
/
phone_numbers
/
csv_downloads
/
{id}
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});

const csvDownload = await client.phoneNumbers.csvDownloads.retrieve('id');

console.log(csvDownload.data);
import os
from telnyx import Telnyx

client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
csv_download = client.phone_numbers.csv_downloads.retrieve(
"id",
)
print(csv_download.data)
package main

import (
"context"
"fmt"

"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)

func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
csvDownload, err := client.PhoneNumbers.CsvDownloads.Get(context.TODO(), "id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", csvDownload.Data)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.phonenumbers.csvdownloads.CsvDownloadRetrieveParams;
import com.telnyx.sdk.models.phonenumbers.csvdownloads.CsvDownloadRetrieveResponse;

public final class Main {
private Main() {}

public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();

CsvDownloadRetrieveResponse csvDownload = client.phoneNumbers().csvDownloads().retrieve("id");
}
}
require "telnyx"

telnyx = Telnyx::Client.new(api_key: "My API Key")

csv_download = telnyx.phone_numbers.csv_downloads.retrieve("id")

puts(csv_download)
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;

$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');

try {
$csvDownload = $client->phoneNumbers->csvDownloads->retrieve('id');

var_dump($csvDownload);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx phone-numbers:csv-downloads retrieve \
--api-key 'My API Key' \
--id id
curl --request GET \
--url https://api.telnyx.com/v2/phone_numbers/csv_downloads/{id} \
--header 'Authorization: Bearer <token>'
{
  "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"
}
}
]
}
{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not understand the provided credentials.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}
{
"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"
}
}
]
}
{
"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"
}
}
]
}
{
"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"
}
}
]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Identifies the CSV download.

Response

Successful response with details about a CSV download.

data
object[]