Domains

List Domain Records

get
https://api.linode.com/v4/domains/{domainId}/records

Returns a paginated list of Records configured on a Domain in Linode's DNS Manager.

Authorizations

Personal Access Token
OAuth: ( domains:read_only)

Path Parameters

domainId
Required
integer

The ID of the Domain we are accessing Records for.

Query Parameters

page
integer > = 1
Default: 1

The page of a collection to return.

page_size
integer [25 .. 100]
Default: 100

The number of items to return per page.

Request Samples

curl -H "Authorization: Bearer $TOKEN" \
    https://api.linode.com/v4/domains/1234/records

Response Samples

{
  "data": [
    {
      "id": "",
      "type": "A",
      "ttl_sec": 604800,
      "name": "test",
      "target": "12.34.56.78",
      "priority": 50,
      "weight": 50,
      "port": 80,
      "service": "",
      "protocol": "",
      "tag": ""
    }
  ],
  "page": 1,
  "pages": 1,
  "results": 1
}

Responses

200: A list of Domain Records.

data
array of objects
id
integer

This Record's unique ID.

type
string
Enum: "A""AAAA""NS""MX""CNAME""TXT""SRV""PTR""CAA"

The type of Record this is in the DNS system. For example, A records associate a domain name with an IPv4 address, and AAAA records associate a domain name with an IPv6 address.

ttl_sec
integer

"Time to Live" - the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

name
string

The name of this Record. This field's actual usage depends on the type of record this represents. For A and AAAA records, this is the subdomain being associated with an IP address.

target
string

The target for this Record. This field's actual usage depends on the type of record this represents. For A and AAAA records, this is the address the named Domain should resolve to.

priority
integer

The priority of the target host. Lower values are preferred.

weight
integer

The relative weight of this Record. Higher values are preferred.

port
integer

The port this Record points to.

service
Nullable
string

The service this Record identified. Only valid for SRV records.

protocol
Nullable
string

The protocol this Record's service communicates with. Only valid for SRV records.

tag
Nullable
string

The tag portion of a CAA record. It is invalid to set this on other record types.

page
integer
pages
integer
results
integer

Create Domain Record

post
https://api.linode.com/v4/domains/{domainId}/records

Adds a new Domain Record to the zonefile this Domain represents.

Authorizations

Personal Access Token
OAuth: ( domains:read_write)

Path Parameters

domainId
Required
integer

The ID of the Domain we are accessing Records for.

Request Body Schema

type
Required
string

The type of Record this is in the DNS system. For example, A records associate a domain name with an IPv4 address, and AAAA records associate a domain name with an IPv6 address.

name
string [1 .. 100] characters

The name of this Record. This field's actual usage depends on the type of record this represents. For A and AAAA records, this is the subdomain being associated with an IP address.

port
integer

The port this Record points to.

priority
integer

The priority of the target host. Lower values are preferred.

protocol
string

The protocol this Record's service communicates with. Only valid for SRV records.

service
string

The service this Record identified. Only valid for SRV records.

tag
string

The tag portion of a CAA record. It is invalid to set this on other record types.

target
string

The target for this Record. This field's actual usage depends on the type of record this represents. For A and AAAA records, this is the address the named Domain should resolve to.

ttl_sec
integer

"Time to Live" - the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

weight
integer

The relative weight of this Record. Higher values are preferred.

Request Samples

curl -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    -X POST -d '{
      "type": "A",
      "name": "test",
      "target": "12.34.56.78",
      "priority": 50,
      "weight": 50,
      "port": 80,
      "service": null,
      "protocol": null,
      "ttl_sec": 604800
    }' \
    https://api.linode.com/v4/domains/123/records

Response Samples

{
  "id": 1234,
  "type": "A",
  "ttl_sec": 604800,
  "name": "test",
  "target": "12.34.56.78",
  "priority": 50,
  "weight": 50,
  "port": 80,
  "service": "",
  "protocol": "",
  "tag": ""
}

Responses

200: Domain Record created successfully.

id
integer

This Record's unique ID.

type
string
Enum: "A""AAAA""NS""MX""CNAME""TXT""SRV""PTR""CAA"

The type of Record this is in the DNS system. For example, A records associate a domain name with an IPv4 address, and AAAA records associate a domain name with an IPv6 address.

ttl_sec
integer

"Time to Live" - the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

name
string [1 .. 100] characters

The name of this Record. This field's actual usage depends on the type of record this represents. For A and AAAA records, this is the subdomain being associated with an IP address.

target
string

The target for this Record. This field's actual usage depends on the type of record this represents. For A and AAAA records, this is the address the named Domain should resolve to.

priority
integer

The priority of the target host. Lower values are preferred.

weight
integer

The relative weight of this Record. Higher values are preferred.

port
integer

The port this Record points to.

service
Nullable
string

The service this Record identified. Only valid for SRV records.

protocol
Nullable
string

The protocol this Record's service communicates with. Only valid for SRV records.

tag
Nullable
string

The tag portion of a CAA record. It is invalid to set this on other record types.

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.