Skip to main content
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);
{
  "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

Authorization
string
header
required

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

Response

List of supported document types.

data
object[]
required
meta
object
required

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.