Update a DIR
Edit a DIR. DIRs in draft, rejected, unsuccessful, or suspended can be edited freely: PATCH is a pure edit, status is never changed, and you re-vet by calling POST /v2/dir/{dir_id}/submit explicitly. A verified DIR can also be edited in place: a PATCH that changes any value returns the DIR to draft; the currently approved identity keeps displaying, and the edited content goes live only after you re-submit and the DIR is approved again. A PATCH that changes nothing (an empty body or values identical to the current ones) leaves the DIR verified, so idempotent retries are safe. Changing only bpo_authorizations or webhook_url is the exception: the DIR stays verified. Each BPO authorization is reviewed on its own instead. DIRs in any other status (submitted, in_review, expired, infringement_claimed, permanently_rejected) cannot be edited.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const dir = await client.dir.update('16635d38-75a6-4481-82e8-69af60e05011', {
call_reasons: ['Appointment reminders', 'Billing inquiries', 'Lab results'],
display_name: 'Acme Plumbing & Wellness',
logo_url: 'https://acmeplumbing.example.com/logo-v2-256.bmp',
});
console.log(dir.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
)
dir = client.dir.update(
dir_id="16635d38-75a6-4481-82e8-69af60e05011",
call_reasons=["Appointment reminders", "Billing inquiries", "Lab results"],
display_name="Acme Plumbing & Wellness",
logo_url="https://acmeplumbing.example.com/logo-v2-256.bmp",
)
print(dir.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"),
)
dir, err := client.Dir.Update(
context.TODO(),
"16635d38-75a6-4481-82e8-69af60e05011",
telnyx.DirUpdateParams{
CallReasons: []string{"Appointment reminders", "Billing inquiries", "Lab results"},
DisplayName: telnyx.String("Acme Plumbing & Wellness"),
LogoURL: telnyx.String("https://acmeplumbing.example.com/logo-v2-256.bmp"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", dir.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.DirUpdateParams;
import com.telnyx.sdk.models.dir.DirUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
DirUpdateResponse dir = client.dir().update("16635d38-75a6-4481-82e8-69af60e05011");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
dir = telnyx.dir.update("16635d38-75a6-4481-82e8-69af60e05011")
puts(dir)<?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 {
$dir = $client->dir->update(
'16635d38-75a6-4481-82e8-69af60e05011',
authorizerEmail: '[email protected]',
authorizerName: 'authorizer_name',
callReasons: ['Appointment reminders', 'Billing inquiries', 'Lab results'],
certifyBrandIsAccurate: true,
certifyIPOwnership: true,
certifyNoShaftContent: true,
displayName: 'Acme Plumbing & Wellness',
documents: [
[
'documentID' => '2a7e8337-e803-4057-a4ae-26c40eb0bc6c',
'documentType' => 'business_registration',
'description' => 'Certificate of incorporation.',
],
],
logoURL: 'https://acmeplumbing.example.com/logo-v2-256.bmp',
reselling: true,
);
var_dump($dir);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx dir update \
--api-key 'My API Key' \
--dir-id 16635d38-75a6-4481-82e8-69af60e05011curl --request PATCH \
--url https://api.telnyx.com/v2/dir/{dir_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "Acme Plumbing & Wellness",
"call_reasons": [
"Appointment reminders",
"Billing inquiries",
"Lab results"
],
"logo_url": "https://acmeplumbing.example.com/logo-v2-256.bmp"
}
'{
"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": "[email protected]",
"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."
}
],
"status": "draft",
"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",
"delete_requested_at": "2026-04-27T09:12:44.201820Z",
"webhook_url": "https://acmehealthcare.example.com/webhooks/branded-calling"
}
}Authorizations
Telnyx API key. Generate one at https://portal.telnyx.com/#/app/api-keys.
Path Parameters
The DIR id. Lowercase UUID.
"16635d38-75a6-4481-82e8-69af60e05011"
Body
All fields are optional; only those supplied are updated. Same per-field rules as DirCreateRequest.
Name shown to call recipients. 1–35 characters, no emoji, not whitespace-only.
1 - 35Set to true if your organization places calls on behalf of other enterprises (BPO/reseller). Updating this triggers re-vetting on next submit.
Name of the person at your enterprise authorizing this DIR. Must be a real individual.
255Contact email of the authorizer. Telnyx may send verification or infringement notices here.
Publicly accessible HTTPS URL (max 128 chars) to a 256x256 BMP logo (max 1 MB).
1281–10 reasons your business calls customers. Validate phrasing against POST /call_reasons/validate.
1 - 10 elements64Certification that the DIR information is accurate. Must be true for the DIR to be submitted for vetting.
true
Certification that this DIR is not used for SHAFT content (Sex, Hate, Alcohol, Firearms, Tobacco) where prohibited. Must be true for the DIR to be submitted for vetting.
true
Certification of ownership of any logos/trademarks shown. Must be true for the DIR to be submitted for vetting.
true
Additional supporting documents to attach. Append-only: existing documents are never removed or replaced, and an empty or omitted list is a no-op. Each document_id may appear at most once on a DIR.
20Show child attributes
Show child attributes
Optional https:// URL that receives webhook notifications when this DIR's compliance review completes. Send null to clear. Changing only this field on a verified DIR does not re-vet it. Maximum 2048 characters.
2048"https://mapleridge.example.com/webhooks/branded-calling"
Optional. Replace this DIR's authorized BPO (Business Process Outsourcer) accounts with these, each with its signed Letter of Authorization. The supplied list replaces the current one: a BPO left out has its authorization removed, and a new BPO (or a changed Letter of Authorization) is created pending admin review. Send an empty list to clear all authorizations; omit the field to leave them unchanged. Editing this list does not re-vet the DIR. Maximum 10.
10Show child attributes
Show child attributes
Response
DIR updated.
Show child attributes
Show child attributes
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const dir = await client.dir.update('16635d38-75a6-4481-82e8-69af60e05011', {
call_reasons: ['Appointment reminders', 'Billing inquiries', 'Lab results'],
display_name: 'Acme Plumbing & Wellness',
logo_url: 'https://acmeplumbing.example.com/logo-v2-256.bmp',
});
console.log(dir.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
)
dir = client.dir.update(
dir_id="16635d38-75a6-4481-82e8-69af60e05011",
call_reasons=["Appointment reminders", "Billing inquiries", "Lab results"],
display_name="Acme Plumbing & Wellness",
logo_url="https://acmeplumbing.example.com/logo-v2-256.bmp",
)
print(dir.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"),
)
dir, err := client.Dir.Update(
context.TODO(),
"16635d38-75a6-4481-82e8-69af60e05011",
telnyx.DirUpdateParams{
CallReasons: []string{"Appointment reminders", "Billing inquiries", "Lab results"},
DisplayName: telnyx.String("Acme Plumbing & Wellness"),
LogoURL: telnyx.String("https://acmeplumbing.example.com/logo-v2-256.bmp"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", dir.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.DirUpdateParams;
import com.telnyx.sdk.models.dir.DirUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
DirUpdateResponse dir = client.dir().update("16635d38-75a6-4481-82e8-69af60e05011");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
dir = telnyx.dir.update("16635d38-75a6-4481-82e8-69af60e05011")
puts(dir)<?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 {
$dir = $client->dir->update(
'16635d38-75a6-4481-82e8-69af60e05011',
authorizerEmail: '[email protected]',
authorizerName: 'authorizer_name',
callReasons: ['Appointment reminders', 'Billing inquiries', 'Lab results'],
certifyBrandIsAccurate: true,
certifyIPOwnership: true,
certifyNoShaftContent: true,
displayName: 'Acme Plumbing & Wellness',
documents: [
[
'documentID' => '2a7e8337-e803-4057-a4ae-26c40eb0bc6c',
'documentType' => 'business_registration',
'description' => 'Certificate of incorporation.',
],
],
logoURL: 'https://acmeplumbing.example.com/logo-v2-256.bmp',
reselling: true,
);
var_dump($dir);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx dir update \
--api-key 'My API Key' \
--dir-id 16635d38-75a6-4481-82e8-69af60e05011curl --request PATCH \
--url https://api.telnyx.com/v2/dir/{dir_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "Acme Plumbing & Wellness",
"call_reasons": [
"Appointment reminders",
"Billing inquiries",
"Lab results"
],
"logo_url": "https://acmeplumbing.example.com/logo-v2-256.bmp"
}
'{
"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": "[email protected]",
"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."
}
],
"status": "draft",
"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",
"delete_requested_at": "2026-04-27T09:12:44.201820Z",
"webhook_url": "https://acmehealthcare.example.com/webhooks/branded-calling"
}
}