Post a comment on a DIR
Post a customer comment on a DIR (for example, to respond to reviewer notes). Send only content (1–5000 chars) and an optional parent_comment_id; the server sets the comment type, visibility, and author automatically. The enterprise is resolved server-side from the DIR id.
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);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
comment = client.dir.comments.create(
dir_id="16635d38-75a6-4481-82e8-69af60e05011",
content="Re-uploaded the certificate. New document_id: 89450109-ee35-411c-b5bb-14f1d806fca2.",
)
print(comment.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"),
)
comment, err := client.Dir.Comments.New(
context.TODO(),
"16635d38-75a6-4481-82e8-69af60e05011",
telnyx.DirCommentNewParams{
Content: "Re-uploaded the certificate. New document_id: 89450109-ee35-411c-b5bb-14f1d806fca2.",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", comment.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.comments.CommentCreateParams;
import com.telnyx.sdk.models.dir.comments.CommentCreateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
CommentCreateParams params = CommentCreateParams.builder()
.dirId("16635d38-75a6-4481-82e8-69af60e05011")
.content("Re-uploaded the certificate. New document_id: 89450109-ee35-411c-b5bb-14f1d806fca2.")
.build();
CommentCreateResponse comment = client.dir().comments().create(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
comment = telnyx.dir.comments.create(
"16635d38-75a6-4481-82e8-69af60e05011",
content: "Re-uploaded the certificate. New document_id: 89450109-ee35-411c-b5bb-14f1d806fca2."
)
puts(comment)<?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 {
$comment = $client->dir->comments->create(
'16635d38-75a6-4481-82e8-69af60e05011',
content: 'Re-uploaded the certificate. New document_id: 89450109-ee35-411c-b5bb-14f1d806fca2.',
parentCommentID: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
);
var_dump($comment);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx dir:comments create \
--api-key 'My API Key' \
--dir-id 16635d38-75a6-4481-82e8-69af60e05011 \
--content 'Re-uploaded the certificate. New document_id: 89450109-ee35-411c-b5bb-14f1d806fca2.'curl --request POST \
--url https://api.telnyx.com/v2/dir/{dir_id}/comments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "Re-uploaded the certificate. New document_id: 89450109-ee35-411c-b5bb-14f1d806fca2."
}
'{
"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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
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.
Response
Comment created.
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 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);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
comment = client.dir.comments.create(
dir_id="16635d38-75a6-4481-82e8-69af60e05011",
content="Re-uploaded the certificate. New document_id: 89450109-ee35-411c-b5bb-14f1d806fca2.",
)
print(comment.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"),
)
comment, err := client.Dir.Comments.New(
context.TODO(),
"16635d38-75a6-4481-82e8-69af60e05011",
telnyx.DirCommentNewParams{
Content: "Re-uploaded the certificate. New document_id: 89450109-ee35-411c-b5bb-14f1d806fca2.",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", comment.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.comments.CommentCreateParams;
import com.telnyx.sdk.models.dir.comments.CommentCreateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
CommentCreateParams params = CommentCreateParams.builder()
.dirId("16635d38-75a6-4481-82e8-69af60e05011")
.content("Re-uploaded the certificate. New document_id: 89450109-ee35-411c-b5bb-14f1d806fca2.")
.build();
CommentCreateResponse comment = client.dir().comments().create(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
comment = telnyx.dir.comments.create(
"16635d38-75a6-4481-82e8-69af60e05011",
content: "Re-uploaded the certificate. New document_id: 89450109-ee35-411c-b5bb-14f1d806fca2."
)
puts(comment)<?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 {
$comment = $client->dir->comments->create(
'16635d38-75a6-4481-82e8-69af60e05011',
content: 'Re-uploaded the certificate. New document_id: 89450109-ee35-411c-b5bb-14f1d806fca2.',
parentCommentID: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
);
var_dump($comment);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx dir:comments create \
--api-key 'My API Key' \
--dir-id 16635d38-75a6-4481-82e8-69af60e05011 \
--content 'Re-uploaded the certificate. New document_id: 89450109-ee35-411c-b5bb-14f1d806fca2.'curl --request POST \
--url https://api.telnyx.com/v2/dir/{dir_id}/comments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "Re-uploaded the certificate. New document_id: 89450109-ee35-411c-b5bb-14f1d806fca2."
}
'{
"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"
}
}