Create an FQDN
POST/fqdns
Create a new FQDN object.
Request
- application/json
Body
connection_id stringrequired
ID of the FQDN connection to which this IP should be attached.
fqdn stringrequired
FQDN represented by this resource.
port integernullable
Default value: 5060
Port to use when connecting to this FQDN.
dns_record_type stringrequired
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.
Responses
201: Successful response with details about an FQDN connection.
- application/json
401: Unauthorized
- application/json
403: The user doesn't have the required permissions to perform the requested action.
- application/json
422: The request was well-formed but was unable to be followed due to semantic errors.
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/fqdns' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"connection_id": "1516447646313612565",
"fqdn": "example.com",
"port": 8080,
"dns_record_type": "a"
}'
Response samples
{
"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": "string",
"detail": "string",
"meta": {
"url": "string"
},
"title": "string",
"source": {
"pointer": "string"
}
}
]
}
{
"errors": [
{
"code": "string",
"detail": "string",
"meta": {
"url": "string"
},
"title": "string",
"source": {
"pointer": "string"
}
}
]
}
{
"errors": [
{
"code": "string",
"detail": "string",
"meta": {
"url": "string"
},
"title": "string",
"source": {
"pointer": "string"
}
}
]
}