Skip to main content
GET
/
dir
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 dirListResponse of client.dir.list()) {
  console.log(dirListResponse.id);
}
{
  "data": [
    {
      "id": "16635d38-75a6-4481-82e8-69af60e05011",
      "enterprise_id": "4a6192a4-573d-446d-b3ce-aff9117272a6",
      "display_name": "Acme Plumbing",
      "reselling": false,
      "certify_brand_is_accurate": true,
      "certify_no_shaft_content": true,
      "certify_ip_ownership": true,
      "authorizer_name": "Sam Owner",
      "authorizer_email": "sam@acmeplumbing.example.com",
      "logo_url": "https://acmeplumbing.example.com/logo-256.bmp",
      "call_reasons": [
        {
          "reason": "Appointment reminders",
          "created_at": "2026-04-26T18:06:51.940749Z"
        }
      ],
      "documents": [
        {
          "document_id": "2a7e8337-e803-4057-a4ae-26c40eb0bc6c",
          "document_type": "business_registration",
          "description": "Certificate of incorporation."
        }
      ],
      "rejection_reasons": [
        {
          "code": "documentation_incomplete",
          "title": "Documentation incomplete",
          "detail": "Provided documents do not establish business identity.",
          "message": "Please re-upload a clearer scan of the certificate."
        }
      ],
      "rejected_at": "2023-11-07T05:31:56Z",
      "created_at": "2026-04-26T18:06:51.940749Z",
      "updated_at": "2026-04-26T18:09:24.785211Z",
      "submitted_at": "2026-04-26T18:07:03.716411Z",
      "verified_at": "2026-04-26T18:07:29.537926Z",
      "expiring_at": "2027-04-26T18:07:29.537981Z"
    }
  ],
  "meta": {
    "total_pages": 3,
    "total_results": 42,
    "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.

Query Parameters

page[number]
integer
default:1

1-based page number. Out-of-range values return an empty page with correct meta.

Required range: x >= 1
Example:

1

page[size]
integer
default:20

Items per page. Maximum 250; values above are clamped to 250.

Required range: 1 <= x <= 250
Example:

20

sort
enum<string>
default:-created_at

Sort field. Allowed values: created_at, updated_at, display_name, status. Prefix with - for descending. Default -created_at.

Available options:
created_at,
-created_at,
updated_at,
-updated_at,
display_name,
-display_name,
status,
-status
filter[expiring_at][gte]
string<date-time>

Return only DIRs whose expiring_at is at or after this ISO-8601 timestamp. Pairs with the [lte] variant to build renewal-window dashboards.

filter[expiring_at][lte]
string<date-time>

Return only DIRs whose expiring_at is at or before this ISO-8601 timestamp.

filter[enterprise_id]
string<uuid>

Filter by enterprise ID.

filter[status]
enum<string>

Filter by DIR status. DIR lifecycle status.

  • draft - newly created; editable; not yet submitted.
  • submitted / in_review - Telnyx is reviewing.
  • verified - approved; phone numbers may be attached.
  • rejected - Telnyx rejected this submission; rejection_reasons is populated; customer can edit and resubmit.
  • unsuccessful - system-side error during processing; customer can edit and resubmit.
  • suspended - temporarily disabled (e.g. by an active infringement claim).
  • expired - verification expired; customer must resubmit.
  • infringement_claimed - a trademark/impersonation claim is open against this DIR.
  • permanently_rejected - terminal; cannot be resubmitted.
Available options:
draft,
submitted,
in_review,
verified,
rejected,
unsuccessful,
suspended,
expired,
infringement_claimed,
permanently_rejected
filter[display_name][contains]
string

Case-insensitive partial match on display name.

filter[call_reason][contains]
string

Case-insensitive partial match on call reason.

Response

Paginated list of DIRs across all your enterprises.

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.