Domains

View Domain Record

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

View a single Record on this Domain.

Authorizations

Personal Access Token
OAuth: ( domains:read_only)

Path Parameters

domainId
Required
integer

The ID of the Domain whose Record you are accessing.

recordId
Required
integer

The ID of the Record you are accessing.

Request Samples

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

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: A Domain Record object.

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.

Update Domain Record

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

Updates a single Record on this Domain.

Authorizations

Personal Access Token
OAuth: ( domains:read_write)

Path Parameters

domainId
Required
integer

The ID of the Domain whose Record you are accessing.

recordId
Required
integer

The ID of the Record you are accessing.

Request Body Schema

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
Nullable
string

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

service
Nullable
string

The service this Record identified. 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.

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.

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.

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 PUT -d '{
      "type": "A",
      "name": "test",
      "target": "12.34.56.78",
      "priority": 50,
      "weight": 50,
      "port": 80,
      "service": null,
      "protocol": null,
      "ttl_sec": 604800,
      "tag": null
    }' \
    https://api.linode.com/v4/domains/123/records/234

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 updated.

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.

Delete Domain Record

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

Deletes a Record on this Domain.

Authorizations

Personal Access Token
OAuth: ( domains:read_write)

Path Parameters

domainId
Required
integer

The ID of the Domain whose Record you are accessing.

recordId
Required
integer

The ID of the Record you are accessing.

Request Samples

curl -H "Authorization: Bearer $TOKEN" \
    -X DELETE \
    https://api.linode.com/v4/domains/123/records/234

Response Samples

{}

Responses

200: Record deleted successfully.

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.