Update an FQDN
Update the details of a specific FQDN.
PATCH
/
fqdns
/
{id}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const fqdn = await client.fqdns.update('1517907029795014409');
console.log(fqdn.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
)
fqdn = client.fqdns.update(
id="1517907029795014409",
)
print(fqdn.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"),
)
fqdn, err := client.Fqdns.Update(
context.TODO(),
"1517907029795014409",
telnyx.FqdnUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", fqdn.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.fqdns.FqdnUpdateParams;
import com.telnyx.sdk.models.fqdns.FqdnUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
FqdnUpdateResponse fqdn = client.fqdns().update("1517907029795014409");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
fqdn = telnyx.fqdns.update("1517907029795014409")
puts(fqdn)<?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 {
$fqdn = $client->fqdns->update(
'1517907029795014409',
connectionID: '1516447646313612565',
dnsRecordType: 'a',
fqdn: 'example.com',
port: 8080,
);
var_dump($fqdn);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx fqdns update \
--api-key 'My API Key' \
--id 1517907029795014409curl --request PATCH \
--url https://api.telnyx.com/v2/fqdns/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "1516447646313612565",
"fqdn": "example.com",
"port": 8080,
"dns_record_type": "a"
}
'{
"data": {
"id": "1293384261075731499",
"record_type": "fqdn",
"connection_id": "1516447646313612565",
"fqdn": "example.com",
"port": 5060,
"dns_record_type": "a",
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not understand the provided credentials.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"errors": [
{
"code": "10010",
"title": "Not authorized",
"detail": "You are not authorized to access the requested resource.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10010"
},
"source": {
"pointer": "/"
}
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "The requested resource or URL could not be found.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10005"
},
"source": {
"pointer": "/"
}
}
]
}{
"errors": [
{
"code": "10015",
"title": "Bad Request",
"detail": "Invalid dnis_format: test, was provided. Acceptable formats are +e164, e164, national, sip_username",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
},
"source": {
"pointer": "/inbound/dnis_number_format"
}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifies the resource.
Example:
"1517907029795014409"
Body
application/json
ID of the FQDN connection to which this IP should be attached.
FQDN represented by this resource.
Example:
"example.com"
Port to use when connecting to this FQDN.
Example:
5060
The DNS record type for the FQDN. For cases where a port is not set, the DNS record type must be 'srv'. For cases where a port is set, the DNS record type must be 'a'. If the DNS record type is 'a' and a port is not specified, 5060 will be used.
Example:
"a"
Response
Successful response with details about an FQDN connection.
Show child attributes
Show child attributes
Example:
{
"id": "1293384261075731499",
"record_type": "fqdn",
"connection_id": "1516447646313612565",
"fqdn": "example.com",
"port": 5060,
"dns_record_type": "a",
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}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 fqdn = await client.fqdns.update('1517907029795014409');
console.log(fqdn.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
)
fqdn = client.fqdns.update(
id="1517907029795014409",
)
print(fqdn.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"),
)
fqdn, err := client.Fqdns.Update(
context.TODO(),
"1517907029795014409",
telnyx.FqdnUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", fqdn.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.fqdns.FqdnUpdateParams;
import com.telnyx.sdk.models.fqdns.FqdnUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
FqdnUpdateResponse fqdn = client.fqdns().update("1517907029795014409");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
fqdn = telnyx.fqdns.update("1517907029795014409")
puts(fqdn)<?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 {
$fqdn = $client->fqdns->update(
'1517907029795014409',
connectionID: '1516447646313612565',
dnsRecordType: 'a',
fqdn: 'example.com',
port: 8080,
);
var_dump($fqdn);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx fqdns update \
--api-key 'My API Key' \
--id 1517907029795014409curl --request PATCH \
--url https://api.telnyx.com/v2/fqdns/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "1516447646313612565",
"fqdn": "example.com",
"port": 8080,
"dns_record_type": "a"
}
'{
"data": {
"id": "1293384261075731499",
"record_type": "fqdn",
"connection_id": "1516447646313612565",
"fqdn": "example.com",
"port": 5060,
"dns_record_type": "a",
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not understand the provided credentials.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"errors": [
{
"code": "10010",
"title": "Not authorized",
"detail": "You are not authorized to access the requested resource.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10010"
},
"source": {
"pointer": "/"
}
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "The requested resource or URL could not be found.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10005"
},
"source": {
"pointer": "/"
}
}
]
}{
"errors": [
{
"code": "10015",
"title": "Bad Request",
"detail": "Invalid dnis_format: test, was provided. Acceptable formats are +e164, e164, national, sip_username",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
},
"source": {
"pointer": "/inbound/dnis_number_format"
}
}
]
}