Skip to main content
POST
/
fqdns
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const fqdn = await client.fqdns.create({
  connection_id: '1516447646313612565',
  dns_record_type: 'a',
  fqdn: 'example.com',
});

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

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
connection_id
string
required

ID of the FQDN connection to which this IP should be attached.

fqdn
string
required

FQDN represented by this resource.

Example:

"example.com"

dns_record_type
string
required

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"

port
integer | null
default:5060

Port to use when connecting to this FQDN.

Example:

5060

Response

Successful response with details about an FQDN connection.

data
object
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"
}