Skip to main content
GET
/
dir
/
{dir_id}
/
comments
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 commentListResponse of client.dir.comments.list(
  '16635d38-75a6-4481-82e8-69af60e05011',
)) {
  console.log(commentListResponse.id);
}
{
  "data": [
    {
      "id": "30bbd13c-1f3a-47c0-8fa6-718835917b2f",
      "entity_type": "dir",
      "content": "Please re-upload a clearer scan of the certificate.",
      "visibility": "customer",
      "author_role": "customer",
      "author_name": null,
      "created_at": "2026-04-27T00:42:44.305835Z"
    }
  ],
  "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.

Path Parameters

dir_id
string<uuid>
required

The DIR id. Lowercase UUID.

Example:

"16635d38-75a6-4481-82e8-69af60e05011"

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

comment_type
enum<string>

Restrict to comments of this category. Customer-visible categories only: internal-only comments are filtered out regardless of this filter. Comment categorisation. Customers post customer_inquiry. The Telnyx team posts vetting_comment, rejection_reason, notification, status_update, or admin_response. internal_note is filtered out of customer-visible responses.

Available options:
vetting_comment,
rejection_reason,
internal_note,
notification,
status_update,
customer_inquiry,
admin_response

Response

Paginated list of comments.

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.