List supported DIR document types
Reference list of document_type values accepted by DirCreateRequest.documents[].document_type and the infringement-contest endpoint. Each entry has a stable short_name (used in API calls) and a customer-facing description.
GET
/
dir
/
document_types
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.dir.listDocumentTypes();
console.log(response.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
)
response = client.dir.list_document_types()
print(response.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"),
)
response, err := client.Dir.ListDocumentTypes(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.dir.DirListDocumentTypesParams;
import com.telnyx.sdk.models.dir.DirListDocumentTypesResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
DirListDocumentTypesResponse response = client.dir().listDocumentTypes();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.dir.list_document_types
puts(response)<?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 {
$response = $client->dir->listDocumentTypes();
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx dir list-document-types \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/dir/document_types \
--header 'Authorization: Bearer <token>'{
"data": [
{
"short_name": "letter_of_authorization",
"description": "Signed authorization from the DIR owner permitting Telnyx to register the DIR and its associated numbers on their behalf"
},
{
"short_name": "business_registration",
"description": "Official Secretary of State (or equivalent) registration showing the legal entity exists and is in good standing"
}
],
"meta": {
"total_pages": 1,
"total_results": 2,
"page_number": 1,
"page_size": 20
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
List of supported document types.
Show child attributes
Show child attributes
JSON:API pagination metadata returned with every paginated list response. Page numbering is 1-based. page_size reports the number of items actually returned in data for this page; the requested size is taken from the page[size] query parameter.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.dir.listDocumentTypes();
console.log(response.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
)
response = client.dir.list_document_types()
print(response.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"),
)
response, err := client.Dir.ListDocumentTypes(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.dir.DirListDocumentTypesParams;
import com.telnyx.sdk.models.dir.DirListDocumentTypesResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
DirListDocumentTypesResponse response = client.dir().listDocumentTypes();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.dir.list_document_types
puts(response)<?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 {
$response = $client->dir->listDocumentTypes();
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx dir list-document-types \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/dir/document_types \
--header 'Authorization: Bearer <token>'{
"data": [
{
"short_name": "letter_of_authorization",
"description": "Signed authorization from the DIR owner permitting Telnyx to register the DIR and its associated numbers on their behalf"
},
{
"short_name": "business_registration",
"description": "Official Secretary of State (or equivalent) registration showing the legal entity exists and is in good standing"
}
],
"meta": {
"total_pages": 1,
"total_results": 2,
"page_number": 1,
"page_size": 20
}
}