This is the API V2 documentation. To switch out of beta revert back to our API V1.

Open SidemenuAPI Reference
API Reference
Close Sidemenu

FQDNs

List all FQDNsFQDNsGet

get https://api.telnyx.com/v2/fqdns

Get all FQDNs belonging to the user that match the given filters.

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/fqdns?page[number]=1&page[size]=20"
Parameters
In query
page[number]
integer (1)
optional

The page number to load

Default: 1
page[size]
integer (1 - 250)
optional

The size of the page

Default: 20
filter[connection_id]
string
optional

ID of the FQDN connection to which the FQDN belongs.

filter[fqdn]
string
optional

FQDN represented by the resource.

Example: "example.com"
filter[port]
integer
optional

Port to use when connecting to the FQDN.

Example: 5060
filter[dns_record_type]
string
optional

DNS record type used by the FQDN.

Example: "a"
Responses
200

Successful response

400

Bad request

401

Unauthorized

Success Response
{
  "data": [
    {
      "connection_id": "3456789987654",
      "created_at": "2018-02-02T22:25:27.521Z",
      "dns_record_type": "a",
      "fqdn": "example.com",
      "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
      "port": 5060,
      "record_type": "fqdn",
      "updated_at": "2018-02-02T22:25:27.521Z"
    }
  ]
}

Create an FQDNaddFQDN

post https://api.telnyx.com/v2/fqdns

Create a new FQDN object.

curl -X POST \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data { "fqdn": "example.com" } \
  https://api.telnyx.com/v2/fqdns
Parameters
In body
fqdn
string
required

FQDN represented by this resource.

Example: "example.com"
connection_id
string
optional

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

dns_record_type
string
optional

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
optional

Port to use when connecting to this FQDN.

Default: 5060
Example: 5060
Responses
201

Successful response

400

Bad request

401

Unauthorized

Success Response
{
  "data": {
    "connection_id": "3456789987654",
    "created_at": "2018-02-02T22:25:27.521Z",
    "dns_record_type": "a",
    "fqdn": "example.com",
    "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    "port": 5060,
    "record_type": "fqdn",
    "updated_at": "2018-02-02T22:25:27.521Z"
  }
}

Retrieve an FQDNgetFQDNDetails

get https://api.telnyx.com/v2/fqdns/{id}

Return the details regarding a specific FQDN.

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/fqdns/6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Parameters
In path
id
string (uuid)
required

Identifies the resource.

Example: "6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Responses
200

Successful response

400

Bad request

401

Unauthorized

Success Response
{
  "data": {
    "connection_id": "3456789987654",
    "created_at": "2018-02-02T22:25:27.521Z",
    "dns_record_type": "a",
    "fqdn": "example.com",
    "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    "port": 5060,
    "record_type": "fqdn",
    "updated_at": "2018-02-02T22:25:27.521Z"
  }
}

Update FQDNupdateFQDN

patch https://api.telnyx.com/v2/fqdns/{id}

Update the details of a specific FQDN.

curl -X PATCH \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{"connection_id":"6a09cdc3-8948-47f0-aa62-74ac943d6c58","dns_record_type":"a"}' \
  https://api.telnyx.com/v2/fqdns/6a09cdc3-8948-47f0-aa62-74ac943d6c58
Parameters
In path
id
string (uuid)
required

Identifies the resource.

Example: "6a09cdc3-8948-47f0-aa62-74ac943d6c58"
In body
fqdn
string
required

FQDN represented by this resource.

Example: "example.com"
connection_id
string
optional

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

dns_record_type
string
optional

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
optional

Port to use when connecting to this FQDN.

Default: 5060
Example: 5060
Responses
200

Successful response

400

Bad request

401

Unauthorized

Success Response
{
  "data": {
    "connection_id": "3456789987654",
    "created_at": "2018-02-02T22:25:27.521Z",
    "dns_record_type": "a",
    "fqdn": "example.com",
    "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    "port": 5060,
    "record_type": "fqdn",
    "updated_at": "2018-02-02T22:25:27.521Z"
  }
}

Delete an FQDNdeleteFQDN

delete https://api.telnyx.com/v2/fqdns/{id}

Delete an FQDN.

curl -X DELETE \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  "https://api.telnyx.com/v2/fqdns/6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Parameters
In path
id
string (uuid)
required

Identifies the resource.

Example: "6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Responses
200

Successful response

400

Bad request

401

Unauthorized

Success Response
{
  "data": {
    "connection_id": "3456789987654",
    "created_at": "2018-02-02T22:25:27.521Z",
    "dns_record_type": "a",
    "fqdn": "example.com",
    "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    "port": 5060,
    "record_type": "fqdn",
    "updated_at": "2018-02-02T22:25:27.521Z"
  }
}

Was this section helpful?was-this-page-helpful