Skip to main content
POST
/
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
});

const comment = await client.dir.comments.create('16635d38-75a6-4481-82e8-69af60e05011', {
  content: 'Re-uploaded the certificate. New document_id: 89450109-ee35-411c-b5bb-14f1d806fca2.',
});

console.log(comment.data);
{
  "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"
  }
}

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"

Body

application/json

Customer-facing comment body. The server forces comment_type=customer_inquiry, visibility=customer, and author_role=customer; clients cannot override these. author_name is dropped to prevent admin-impersonation.

content
string
required

Comment body. 1–5000 characters.

Required string length: 1 - 5000
Example:

"Re-uploaded the logo as a 256×256 BMP. Please re-review."

parent_comment_id
string<uuid>

Optional parent comment id to thread this reply under.

Response

Comment created.

data
object
required