List a DIR's references
List the business and financial references submitted for a DIR.
Returns the two business references (slots 1 and 2) followed by the single financial reference. Each entry carries its ref_type and slot, which together address the reference when updating it, alongside the details supplied when it was submitted (name, title, organization, relationship, phone, email, timezone). No internal identifiers are exposed. Returns an empty list when no references were submitted.
GET
/
dir
/
{dir_id}
/
references
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const response of client.dir.references.list()) {
console.log(response);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.dir.references.list(
"dir_id",
)
print(page.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"),
)
references, err := client.Dir.References.List(
context.TODO(),
"dir_id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", references.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var page = client.dir().references().list("dir_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.dir.references.list("dir_id")
puts(page)<?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 {
$page = $client->dir->references->list(
'dir_id',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx dir:references list \
--api-key 'My API Key' \
--dir-id 16635d38-75a6-4481-82e8-69af60e05011curl --request GET \
--url https://api.telnyx.com/v2/dir/{dir_id}/references \
--header 'Authorization: Bearer <token>'{
"data": [
{
"record_type": "dir_reference",
"ref_type": "business",
"slot": 1,
"full_name": "Dana Reyes",
"phone_e164": "+14155550123",
"timezone": "America/New_York",
"job_title": "VP of Operations",
"organization": "Acme Logistics",
"relationship_to_registrant": "Supplier",
"email": "[email protected]"
}
]
}Authorizations
Telnyx API key. Generate one at https://portal.telnyx.com/#/app/api-keys.
Path Parameters
The DIR id. Lowercase UUID.
Example:
"16635d38-75a6-4481-82e8-69af60e05011"
Response
The DIR's references.
Show child attributes
Show child attributes
Was this page helpful?
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const response of client.dir.references.list()) {
console.log(response);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.dir.references.list(
"dir_id",
)
print(page.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"),
)
references, err := client.Dir.References.List(
context.TODO(),
"dir_id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", references.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var page = client.dir().references().list("dir_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.dir.references.list("dir_id")
puts(page)<?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 {
$page = $client->dir->references->list(
'dir_id',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx dir:references list \
--api-key 'My API Key' \
--dir-id 16635d38-75a6-4481-82e8-69af60e05011curl --request GET \
--url https://api.telnyx.com/v2/dir/{dir_id}/references \
--header 'Authorization: Bearer <token>'{
"data": [
{
"record_type": "dir_reference",
"ref_type": "business",
"slot": 1,
"full_name": "Dana Reyes",
"phone_e164": "+14155550123",
"timezone": "America/New_York",
"job_title": "VP of Operations",
"organization": "Acme Logistics",
"relationship_to_registrant": "Supplier",
"email": "[email protected]"
}
]
}