Update a DIR reference
Partially update one reference, addressed by the DIR id plus the reference’s type (business or financial) and slot.
Cosmetic fields (full name, job title, organization, relationship, email) are always editable. The phone number and timezone may only be changed while a scheduled call has not yet been dialed; if a call is in progress or all attempts are complete, those fields are locked. Changing the timezone reschedules any pending call into the new local calling window.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const ReferenceWrapped = await client.dir.references.update('dir_id', 'ref_type', 'slot', {
full_name: 'Dana Reyes',
});
console.log(ReferenceWrapped.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
)
reference_wrapped = client.dir.references.update(
dir_id="dir_id",
ref_type="ref_type",
slot="slot",
full_name="Dana Reyes",
)
print(reference_wrapped.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"),
)
reference, err := client.Dir.References.Update(
context.TODO(),
"dir_id",
"ref_type",
"slot",
telnyx.DirReferenceUpdateParams{
FullName: telnyx.String("Dana Reyes"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", reference.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.references.ReferenceUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ReferenceUpdateParams params = ReferenceUpdateParams.builder()
.fullName("Dana Reyes")
.build();
var response = client.dir().references().update("dir_id", "ref_type", "slot", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
reference_wrapped = telnyx.dir.references.update(
"dir_id",
"ref_type",
"slot",
full_name: "Dana Reyes"
)
puts(reference_wrapped)<?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 {
$reference_wrapped = $client->dir->references->update(
'dir_id',
'ref_type',
'slot',
full_name: 'Dana Reyes',
);
var_dump($reference_wrapped);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx dir:references update \
--api-key 'My API Key' \
--dir-id 16635d38-75a6-4481-82e8-69af60e05011 \
--ref-type business \
--slot 1 \
--full-name 'Dana Reyes'curl --request PATCH \
--url https://api.telnyx.com/v2/dir/{dir_id}/references/{ref_type}/{slot} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"full_name": "Dana Reyes",
"job_title": "VP of Operations",
"organization": "Acme Logistics",
"relationship_to_registrant": "Supplier",
"phone_e164": "+14155550123",
"email": "[email protected]",
"timezone": "America/New_York"
}
'{
"data": {
"record_type": "dir_reference",
"ref_type": "business",
"slot": 1,
"full_name": "Dana Reyes",
"phone_e164": "+14155550123",
"timezone": "America/New_York",
"job_title": "VP of Operations",
"organization": "Acme Logistics",
"relationship_to_registrant": "Supplier",
"email": "[email protected]"
}
}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"
Reference type to address.
business, financial "business"
Reference slot, counting from 1. Business references are slots 1 and 2, matching the order they were sent in the business_references array; the financial reference is slot 1. Every reference returned by the submit and list endpoints carries its own ref_type and slot, so you do not need to derive them.
1 <= x <= 21
Body
Partial update for a single reference; supply at least one field. Cosmetic fields are always editable. phone_e164 and timezone may only be changed while a scheduled call has not yet been dialed.
The full name of the person we should contact as your reference.
1 - 255"Dana Reyes"
The reference contact's job title, for example CFO or Owner.
255"VP of Operations"
The name of the organization the reference contact works for.
255"Acme Logistics"
How the reference contact is related to the registering business.
255"Supplier"
The reference's phone number in E.164 format, for example +14155550123. We call this number during their local business hours.
^\+[1-9]\d{1,14}$"+14155550123"
The reference's email address. We email them scheduling and dial-in instructions before we call, so use an address they check.
The reference's IANA time zone, for example America/New_York. We only call during their local 8am to 9pm hours, which is why we need it.
"America/New_York"
Response
The updated reference.
A reference (business or financial) on a DIR, in the customer-facing shape. No internal identifiers are exposed.
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 ReferenceWrapped = await client.dir.references.update('dir_id', 'ref_type', 'slot', {
full_name: 'Dana Reyes',
});
console.log(ReferenceWrapped.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
)
reference_wrapped = client.dir.references.update(
dir_id="dir_id",
ref_type="ref_type",
slot="slot",
full_name="Dana Reyes",
)
print(reference_wrapped.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"),
)
reference, err := client.Dir.References.Update(
context.TODO(),
"dir_id",
"ref_type",
"slot",
telnyx.DirReferenceUpdateParams{
FullName: telnyx.String("Dana Reyes"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", reference.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.references.ReferenceUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ReferenceUpdateParams params = ReferenceUpdateParams.builder()
.fullName("Dana Reyes")
.build();
var response = client.dir().references().update("dir_id", "ref_type", "slot", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
reference_wrapped = telnyx.dir.references.update(
"dir_id",
"ref_type",
"slot",
full_name: "Dana Reyes"
)
puts(reference_wrapped)<?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 {
$reference_wrapped = $client->dir->references->update(
'dir_id',
'ref_type',
'slot',
full_name: 'Dana Reyes',
);
var_dump($reference_wrapped);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx dir:references update \
--api-key 'My API Key' \
--dir-id 16635d38-75a6-4481-82e8-69af60e05011 \
--ref-type business \
--slot 1 \
--full-name 'Dana Reyes'curl --request PATCH \
--url https://api.telnyx.com/v2/dir/{dir_id}/references/{ref_type}/{slot} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"full_name": "Dana Reyes",
"job_title": "VP of Operations",
"organization": "Acme Logistics",
"relationship_to_registrant": "Supplier",
"phone_e164": "+14155550123",
"email": "[email protected]",
"timezone": "America/New_York"
}
'{
"data": {
"record_type": "dir_reference",
"ref_type": "business",
"slot": 1,
"full_name": "Dana Reyes",
"phone_e164": "+14155550123",
"timezone": "America/New_York",
"job_title": "VP of Operations",
"organization": "Acme Logistics",
"relationship_to_registrant": "Supplier",
"email": "[email protected]"
}
}