Domains v4.166.0
Domains List
This is a collection of Domains that you have registered in Linode’s DNS Manager. Linode is not a registrar, and in order for these to work you must own the domains and point your registrar at Linode’s nameservers.
Authorizations
personalAccessToken | |
oauth | domains:read_only |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/domains
linode-cli domains list
Response Samples
{
"data": [
{
"axfr_ips": [],
"description": null,
"domain": "example.org",
"expire_sec": 300,
"group": null,
"id": 1234,
"master_ips": [],
"refresh_sec": 300,
"retry_sec": 300,
"soa_email": "admin@example.org",
"status": "active",
"tags": [
"example tag",
"another example"
],
"ttl_sec": 300,
"type": "master"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||||||||||||||||||
page | integer The current page. | ||||||||||||||||||||||||||||
pages | integer The total number of pages. | ||||||||||||||||||||||||||||
results | integer The total number of results. |
errors | array
of objects
|
Domain Create
Adds a new Domain to Linode’s DNS Manager. Linode is not a registrar, and you must own the domain before adding it here. Be sure to point your registrar to Linode’s nameservers so that the records hosted here are used.
Authorizations
personalAccessToken | |
oauth | domains:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"domain": "example.com",
"type": "master",
"soa_email": "admin@example.com",
"description": "Example Description",
"refresh_sec": 14400,
"retry_sec": 3600,
"expire_sec": 604800,
"ttl_sec": 3600,
"status": "active",
"master_ips": ["127.0.0.1","255.255.255.1","123.123.123.7"],
"axfr_ips": ["44.55.66.77"],
"group": "Example Display Group",
"tags": ["tag1","tag2"]
}' \
https://api.linode.com/v4/domains
linode-cli domains create \
--type master \
--domain example.org \
--soa_email admin@example.org
Request Body Schema
axfr_ips | array
of strings The list of IPs that may perform a zone transfer for this Domain. The total combined length of all data within this array cannot exceed 1000 characters. Note: This is potentially dangerous, and should be set to an empty list unless you intend to use it. |
description | string
1..253
charactersA description for this Domain. This is for display purposes only. |
domain Required | string
1..253
charactersThe domain this Domain represents. Domain labels cannot be longer than 63 characters and must conform to RFC1035. Domains must be unique on Linode’s platform, including across different Linode accounts; there cannot be two Domains representing the same domain. |
expire_sec | integer The amount of time in seconds that may pass before this Domain is no longer authoritative.
|
group | string
1..50
charactersThe group this Domain belongs to. This is for display purposes only. |
master_ips | array
of strings The IP addresses representing the master DNS for this Domain. At least one value is required for |
refresh_sec | integer The amount of time in seconds before this Domain should be refreshed.
|
retry_sec | integer The interval, in seconds, at which a failed refresh should be retried.
|
soa_email | string<email> Start of Authority email address. This is required for |
status | string Enum:
disabled
active
Default:
active Used to control whether this Domain is currently being rendered. |
tags | array
of strings An array of tags applied to this object. Tags are for organizational purposes only. |
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.
|
type Required | string Enum:
master
slave Whether this Domain represents the authoritative source of information for the domain it describes (“master”), or whether it is a read-only copy of a master (“slave”). |
Response Samples
{
"axfr_ips": [],
"description": null,
"domain": "example.org",
"expire_sec": 300,
"group": null,
"id": 1234,
"master_ips": [],
"refresh_sec": 300,
"retry_sec": 300,
"soa_email": "admin@example.org",
"status": "active",
"tags": [
"example tag",
"another example"
],
"ttl_sec": 300,
"type": "master"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
axfr_ips | array
of strings The list of IPs that may perform a zone transfer for this Domain. The total combined length of all data within this array cannot exceed 1000 characters. Note: This is potentially dangerous, and should be set to an empty list unless you intend to use it. |
description | string
1..253
charactersA description for this Domain. This is for display purposes only. |
domain | string
1..253
charactersThe domain this Domain represents. Domain labels cannot be longer than 63 characters and must conform to RFC1035. Domains must be unique on Linode’s platform, including across different Linode accounts; there cannot be two Domains representing the same domain. |
expire_sec | integer The amount of time in seconds that may pass before this Domain is no longer authoritative.
|
group | string
1..50
charactersThe group this Domain belongs to. This is for display purposes only. |
id | integer This Domain’s unique ID |
master_ips | array
of strings The IP addresses representing the master DNS for this Domain. At least one value is required for |
refresh_sec | integer The amount of time in seconds before this Domain should be refreshed.
|
retry_sec | integer The interval, in seconds, at which a failed refresh should be retried.
|
soa_email | string<email> Start of Authority email address. This is required for |
status | string Enum:
disabled
active
Default:
active Used to control whether this Domain is currently being rendered. |
tags | array
of strings An array of tags applied to this object. Tags are for organizational purposes only. |
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.
|
type | string Enum:
master
slave Whether this Domain represents the authoritative source of information for the domain it describes (“master”), or whether it is a read-only copy of a master (“slave”). |
errors | array
of objects
|
Domain Import
Imports a domain zone from a remote nameserver. Your nameserver must allow zone transfers (AXFR) from the following IPs:
- 96.126.114.97
- 96.126.114.98
- 2600:3c00::5e
- 2600:3c00::5f
Authorizations
personalAccessToken | |
oauth | domains:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"domain": "example.com",
"remote_nameserver": "examplenameserver.com"
}' \
https://api.linode.com/v4/domains/import
linode-cli domains import --domain example.com --remote_nameserver examplenameserver.com
Request Body Schema
domain Required | string The domain to import. |
remote_nameserver Required | string The remote nameserver that allows zone transfers (AXFR). |
Response Samples
{
"axfr_ips": [],
"description": null,
"domain": "example.org",
"expire_sec": 300,
"group": null,
"id": 1234,
"master_ips": [],
"refresh_sec": 300,
"retry_sec": 300,
"soa_email": "admin@example.org",
"status": "active",
"tags": [
"example tag",
"another example"
],
"ttl_sec": 300,
"type": "master"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
axfr_ips | array
of strings The list of IPs that may perform a zone transfer for this Domain. The total combined length of all data within this array cannot exceed 1000 characters. Note: This is potentially dangerous, and should be set to an empty list unless you intend to use it. |
description | string
1..253
charactersA description for this Domain. This is for display purposes only. |
domain | string
1..253
charactersThe domain this Domain represents. Domain labels cannot be longer than 63 characters and must conform to RFC1035. Domains must be unique on Linode’s platform, including across different Linode accounts; there cannot be two Domains representing the same domain. |
expire_sec | integer The amount of time in seconds that may pass before this Domain is no longer authoritative.
|
group | string
1..50
charactersThe group this Domain belongs to. This is for display purposes only. |
id | integer This Domain’s unique ID |
master_ips | array
of strings The IP addresses representing the master DNS for this Domain. At least one value is required for |
refresh_sec | integer The amount of time in seconds before this Domain should be refreshed.
|
retry_sec | integer The interval, in seconds, at which a failed refresh should be retried.
|
soa_email | string<email> Start of Authority email address. This is required for |
status | string Enum:
disabled
active
Default:
active Used to control whether this Domain is currently being rendered. |
tags | array
of strings An array of tags applied to this object. Tags are for organizational purposes only. |
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.
|
type | string Enum:
master
slave Whether this Domain represents the authoritative source of information for the domain it describes (“master”), or whether it is a read-only copy of a master (“slave”). |
errors | array
of objects
|
Domain Delete
Deletes a Domain from Linode’s DNS Manager. The Domain will be removed from Linode’s nameservers shortly after this operation completes. This also deletes all associated Domain Records.
Authorizations
personalAccessToken | |
oauth | domains:read_write |
Path Parameters
domainId | integer RequiredThe ID of the Domain to access. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/domains/1234
linode-cli domains delete 1234
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Domain View
This is a single Domain that you have registered in Linode’s DNS Manager. Linode is not a registrar, and in order for this Domain record to work you must own the domain and point your registrar at Linode’s nameservers.
Authorizations
personalAccessToken | |
oauth | domains:read_only |
Path Parameters
domainId | integer RequiredThe ID of the Domain to access. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/domains/123
linode-cli domains view 123
Response Samples
{
"axfr_ips": [],
"description": null,
"domain": "example.org",
"expire_sec": 300,
"group": null,
"id": 1234,
"master_ips": [],
"refresh_sec": 300,
"retry_sec": 300,
"soa_email": "admin@example.org",
"status": "active",
"tags": [
"example tag",
"another example"
],
"ttl_sec": 300,
"type": "master"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
axfr_ips | array
of strings The list of IPs that may perform a zone transfer for this Domain. The total combined length of all data within this array cannot exceed 1000 characters. Note: This is potentially dangerous, and should be set to an empty list unless you intend to use it. |
description | string
1..253
charactersA description for this Domain. This is for display purposes only. |
domain | string
1..253
charactersThe domain this Domain represents. Domain labels cannot be longer than 63 characters and must conform to RFC1035. Domains must be unique on Linode’s platform, including across different Linode accounts; there cannot be two Domains representing the same domain. |
expire_sec | integer The amount of time in seconds that may pass before this Domain is no longer authoritative.
|
group | string
1..50
charactersThe group this Domain belongs to. This is for display purposes only. |
id | integer This Domain’s unique ID |
master_ips | array
of strings The IP addresses representing the master DNS for this Domain. At least one value is required for |
refresh_sec | integer The amount of time in seconds before this Domain should be refreshed.
|
retry_sec | integer The interval, in seconds, at which a failed refresh should be retried.
|
soa_email | string<email> Start of Authority email address. This is required for |
status | string Enum:
disabled
active
Default:
active Used to control whether this Domain is currently being rendered. |
tags | array
of strings An array of tags applied to this object. Tags are for organizational purposes only. |
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.
|
type | string Enum:
master
slave Whether this Domain represents the authoritative source of information for the domain it describes (“master”), or whether it is a read-only copy of a master (“slave”). |
errors | array
of objects
|
Domain Update
Update information about a Domain in Linode’s DNS Manager.
Authorizations
personalAccessToken | |
oauth | domains:read_write |
Path Parameters
domainId | integer RequiredThe ID of the Domain to access. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"domain": "example.com",
"type": "master",
"soa_email": "admin@example.com",
"description": "Example Description",
"refresh_sec": 14400,
"retry_sec": 3600,
"expire_sec": 604800,
"ttl_sec": 3600,
"status": "active",
"master_ips": ["127.0.0.1","255.255.255.1","123.123.123.7"],
"axfr_ips": ["44.55.66.77"],
"group": "Example Display Group",
"tags": ["tag1","tag2"]
}' \
https://api.linode.com/v4/domains/123
linode-cli domains update 1234 \
--retry_sec 7200 \
--ttl_sec 300
Request Body Schema
axfr_ips | array
of strings The list of IPs that may perform a zone transfer for this Domain. The total combined length of all data within this array cannot exceed 1000 characters. Note: This is potentially dangerous, and should be set to an empty list unless you intend to use it. |
description | string
1..253
charactersA description for this Domain. This is for display purposes only. |
domain | string
1..253
charactersThe domain this Domain represents. Domain labels cannot be longer than 63 characters and must conform to RFC1035. Domains must be unique on Linode’s platform, including across different Linode accounts; there cannot be two Domains representing the same domain. |
expire_sec | integer The amount of time in seconds that may pass before this Domain is no longer authoritative.
|
group | string
1..50
charactersThe group this Domain belongs to. This is for display purposes only. |
master_ips | array
of strings The IP addresses representing the master DNS for this Domain. At least one value is required for |
refresh_sec | integer The amount of time in seconds before this Domain should be refreshed.
|
retry_sec | integer The interval, in seconds, at which a failed refresh should be retried.
|
soa_email | string<email> Start of Authority email address. This is required for |
status | string Enum:
disabled
active
Default:
active Used to control whether this Domain is currently being rendered. |
tags | array
of strings An array of tags applied to this object. Tags are for organizational purposes only. |
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.
|
type | string Enum:
master
slave Whether this Domain represents the authoritative source of information for the domain it describes (“master”), or whether it is a read-only copy of a master (“slave”). |
Response Samples
{
"axfr_ips": [],
"description": null,
"domain": "example.org",
"expire_sec": 300,
"group": null,
"id": 1234,
"master_ips": [],
"refresh_sec": 300,
"retry_sec": 300,
"soa_email": "admin@example.org",
"status": "active",
"tags": [
"example tag",
"another example"
],
"ttl_sec": 300,
"type": "master"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
axfr_ips | array
of strings The list of IPs that may perform a zone transfer for this Domain. The total combined length of all data within this array cannot exceed 1000 characters. Note: This is potentially dangerous, and should be set to an empty list unless you intend to use it. |
description | string
1..253
charactersA description for this Domain. This is for display purposes only. |
domain | string
1..253
charactersThe domain this Domain represents. Domain labels cannot be longer than 63 characters and must conform to RFC1035. Domains must be unique on Linode’s platform, including across different Linode accounts; there cannot be two Domains representing the same domain. |
expire_sec | integer The amount of time in seconds that may pass before this Domain is no longer authoritative.
|
group | string
1..50
charactersThe group this Domain belongs to. This is for display purposes only. |
id | integer This Domain’s unique ID |
master_ips | array
of strings The IP addresses representing the master DNS for this Domain. At least one value is required for |
refresh_sec | integer The amount of time in seconds before this Domain should be refreshed.
|
retry_sec | integer The interval, in seconds, at which a failed refresh should be retried.
|
soa_email | string<email> Start of Authority email address. This is required for |
status | string Enum:
disabled
active
Default:
active Used to control whether this Domain is currently being rendered. |
tags | array
of strings An array of tags applied to this object. Tags are for organizational purposes only. |
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.
|
type | string Enum:
master
slave Whether this Domain represents the authoritative source of information for the domain it describes (“master”), or whether it is a read-only copy of a master (“slave”). |
errors | array
of objects
|
Domain Clone
Clones a Domain and all associated DNS records from a Domain that is registered in Linode’s DNS manager.
Authorizations
personalAccessToken | |
oauth | domains:read_write |
Path Parameters
domainId | string RequiredID of the Domain to clone. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"domain": "example.com"
}' \ https://api.linode.com/v4/domains/123/clone
linode-cli domains clone 123 --domain example.com
Request Body Schema
domain Required | string
1..253
charactersThe new domain for the clone. Domain labels cannot be longer than 63 characters and must conform to RFC1035. Domains must be unique on Linode’s platform, including across different Linode accounts; there cannot be two Domains representing the same domain. |
Response Samples
{
"axfr_ips": [],
"description": null,
"domain": "example.org",
"expire_sec": 300,
"group": null,
"id": 1234,
"master_ips": [],
"refresh_sec": 300,
"retry_sec": 300,
"soa_email": "admin@example.org",
"status": "active",
"tags": [
"example tag",
"another example"
],
"ttl_sec": 300,
"type": "master"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
axfr_ips | array
of strings The list of IPs that may perform a zone transfer for this Domain. The total combined length of all data within this array cannot exceed 1000 characters. Note: This is potentially dangerous, and should be set to an empty list unless you intend to use it. |
description | string
1..253
charactersA description for this Domain. This is for display purposes only. |
domain | string
1..253
charactersThe domain this Domain represents. Domain labels cannot be longer than 63 characters and must conform to RFC1035. Domains must be unique on Linode’s platform, including across different Linode accounts; there cannot be two Domains representing the same domain. |
expire_sec | integer The amount of time in seconds that may pass before this Domain is no longer authoritative.
|
group | string
1..50
charactersThe group this Domain belongs to. This is for display purposes only. |
id | integer This Domain’s unique ID |
master_ips | array
of strings The IP addresses representing the master DNS for this Domain. At least one value is required for |
refresh_sec | integer The amount of time in seconds before this Domain should be refreshed.
|
retry_sec | integer The interval, in seconds, at which a failed refresh should be retried.
|
soa_email | string<email> Start of Authority email address. This is required for |
status | string Enum:
disabled
active
Default:
active Used to control whether this Domain is currently being rendered. |
tags | array
of strings An array of tags applied to this object. Tags are for organizational purposes only. |
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.
|
type | string Enum:
master
slave Whether this Domain represents the authoritative source of information for the domain it describes (“master”), or whether it is a read-only copy of a master (“slave”). |
errors | array
of objects
|
Domain Records List
Returns a paginated list of Records configured on a Domain in Linode’s DNS Manager.
Authorizations
personalAccessToken | |
oauth | domains:read_only |
Path Parameters
domainId | integer RequiredThe ID of the Domain we are accessing Records for. |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/domains/1234/records
linode-cli domains records-list 1234
Response Samples
{
"data": [
{
"created": "2018-01-01T00:01:01",
"id": 123456,
"name": "test",
"port": 80,
"priority": 50,
"protocol": null,
"service": null,
"tag": null,
"target": "192.0.2.0",
"ttl_sec": 604800,
"type": "A",
"updated": "2018-01-01T00:01:01",
"weight": 50
}
],
"page": 1,
"pages": 1,
"results": 1
}
Responses
data | array
of objects
| ||||||||||||||||||||||||||
page | integer The current page. | ||||||||||||||||||||||||||
pages | integer The total number of pages. | ||||||||||||||||||||||||||
results | integer The total number of results. |
Domain Record Create
Adds a new Domain Record to the zonefile this Domain represents.
Each domain can have up to 12,000 active records.
Authorizations
personalAccessToken | |
oauth | domains:read_write |
Path Parameters
domainId | integer RequiredThe ID of the Domain we are accessing Records for. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"type": "A",
"name": "test",
"target": "203.0.113.1",
"priority": 50,
"weight": 50,
"port": 80,
"service": null,
"protocol": null,
"ttl_sec": 604800
}' \
https://api.linode.com/v4/domains/123/records
linode-cli domains records-create 123 \
--type A \
--name test \
--target 203.0.113.1 \
--priority 50 \
--weight 50 \
--port 80 \
--ttl_sec 604800
Request Body Schema
name | string
1..100
charactersThe name of this Record. For requests, this property’s actual usage and whether it is required depends on the type of record this represents:
|
port | integer
0..65535The port this Record points to. Only valid and required for SRV record requests. |
priority | integer
0..255The priority of the target host for this Record. Lower values are preferred. Only valid for MX and SRV record requests. Required for SRV record requests. Defaults to |
protocol Nullable | string The protocol this Record’s service communicates with. An underscore ( |
service Nullable | string The name of the service. An underscore ( |
tag Nullable | string Enum:
issue
issuewild
iodef The tag portion of a CAA record. Only valid and required for CAA record requests. |
target | string
<=
65535
charactersThe target for this Record. For requests, this property’s actual usage and whether it is required depends on the type of record this represents:
With the exception of A, AAAA, and CAA records, this field accepts a trailing period. |
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 Required | 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. For more information, see the guides on DNS Record Types. |
weight | integer
0..65535The relative weight of this Record used in the case of identical priority. Higher values are preferred. Only valid and required for SRV record requests. |
Response Samples
{
"created": "2018-01-01T00:01:01",
"id": 123456,
"name": "test",
"port": 80,
"priority": 50,
"protocol": null,
"service": null,
"tag": null,
"target": "192.0.2.0",
"ttl_sec": 604800,
"type": "A",
"updated": "2018-01-01T00:01:01",
"weight": 50
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string<date-time> When this Domain Record was created. |
id | integer This Record’s unique ID. |
name | string
1..100
charactersThe name of this Record. For requests, this property’s actual usage and whether it is required depends on the type of record this represents:
|
port | integer
0..65535The port this Record points to. Only valid and required for SRV record requests. |
priority | integer
0..255The priority of the target host for this Record. Lower values are preferred. Only valid for MX and SRV record requests. Required for SRV record requests. Defaults to |
protocol Nullable | string The protocol this Record’s service communicates with. An underscore ( |
service Nullable | string The name of the service. An underscore ( |
tag Nullable | string Enum:
issue
issuewild
iodef The tag portion of a CAA record. Only valid and required for CAA record requests. |
target | string
<=
65535
charactersThe target for this Record. For requests, this property’s actual usage and whether it is required depends on the type of record this represents:
With the exception of A, AAAA, and CAA records, this field accepts a trailing period. |
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. For more information, see the guides on DNS Record Types. |
updated | string<date-time> When this Domain Record was last updated. |
weight | integer
0..65535The relative weight of this Record used in the case of identical priority. Higher values are preferred. Only valid and required for SRV record requests. |
errors | array
of objects
|
Domain Record Delete
Deletes a Record on this Domain.
Authorizations
personalAccessToken | |
oauth | domains:read_write |
Path Parameters
domainId | integer RequiredThe ID of the Domain whose Record you are accessing. |
recordId | integer RequiredThe 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
linode-cli domains records-delete 123 234
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Domain Record View
View a single Record on this Domain.
Authorizations
personalAccessToken | |
oauth | domains:read_only |
Path Parameters
domainId | integer RequiredThe ID of the Domain whose Record you are accessing. |
recordId | integer RequiredThe ID of the Record you are accessing. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/domains/123/records/234
linode-cli domains records-view 123 234
Response Samples
{
"created": "2018-01-01T00:01:01",
"id": 123456,
"name": "test",
"port": 80,
"priority": 50,
"protocol": null,
"service": null,
"tag": null,
"target": "192.0.2.0",
"ttl_sec": 604800,
"type": "A",
"updated": "2018-01-01T00:01:01",
"weight": 50
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string<date-time> When this Domain Record was created. |
id | integer This Record’s unique ID. |
name | string
1..100
charactersThe name of this Record. For requests, this property’s actual usage and whether it is required depends on the type of record this represents:
|
port | integer
0..65535The port this Record points to. Only valid and required for SRV record requests. |
priority | integer
0..255The priority of the target host for this Record. Lower values are preferred. Only valid for MX and SRV record requests. Required for SRV record requests. Defaults to |
protocol Nullable | string The protocol this Record’s service communicates with. An underscore ( |
service Nullable | string The name of the service. An underscore ( |
tag Nullable | string Enum:
issue
issuewild
iodef The tag portion of a CAA record. Only valid and required for CAA record requests. |
target | string
<=
65535
charactersThe target for this Record. For requests, this property’s actual usage and whether it is required depends on the type of record this represents:
With the exception of A, AAAA, and CAA records, this field accepts a trailing period. |
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. For more information, see the guides on DNS Record Types. |
updated | string<date-time> When this Domain Record was last updated. |
weight | integer
0..65535The relative weight of this Record used in the case of identical priority. Higher values are preferred. Only valid and required for SRV record requests. |
errors | array
of objects
|
Domain Record Update
Updates a single Record on this Domain.
Authorizations
personalAccessToken | |
oauth | domains:read_write |
Path Parameters
domainId | integer RequiredThe ID of the Domain whose Record you are accessing. |
recordId | integer RequiredThe ID of the Record you are accessing. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"name": "test",
"target": "203.0.113.1",
"priority": 50,
"weight": 50,
"port": 80,
"service": null,
"protocol": null,
"ttl_sec": 604800,
"tag": null
}' \
https://api.linode.com/v4/domains/123/records/234
linode-cli domains records-update 123 234 \
--name test \
--target 203.0.113.1 \
--priority 50 \
--weight 50 \
--port 80 \
--ttl_sec 604800
Request Body Schema
name | string
1..100
charactersThe name of this Record. For requests, this property’s actual usage and whether it is required depends on the type of record this represents:
|
port | integer
0..65535The port this Record points to. Only valid and required for SRV record requests. |
priority | integer
0..255The priority of the target host for this Record. Lower values are preferred. Only valid for MX and SRV record requests. Required for SRV record requests. Defaults to |
protocol Nullable | string The protocol this Record’s service communicates with. An underscore ( |
service Nullable | string The name of the service. An underscore ( |
tag Nullable | string Enum:
issue
issuewild
iodef The tag portion of a CAA record. Only valid and required for CAA record requests. |
target | string
<=
65535
charactersThe target for this Record. For requests, this property’s actual usage and whether it is required depends on the type of record this represents:
With the exception of A, AAAA, and CAA records, this field accepts a trailing period. |
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
0..65535The relative weight of this Record used in the case of identical priority. Higher values are preferred. Only valid and required for SRV record requests. |
Response Samples
{
"created": "2018-01-01T00:01:01",
"id": 123456,
"name": "test",
"port": 80,
"priority": 50,
"protocol": null,
"service": null,
"tag": null,
"target": "192.0.2.0",
"ttl_sec": 604800,
"type": "A",
"updated": "2018-01-01T00:01:01",
"weight": 50
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string<date-time> When this Domain Record was created. |
id | integer This Record’s unique ID. |
name | string
1..100
charactersThe name of this Record. For requests, this property’s actual usage and whether it is required depends on the type of record this represents:
|
port | integer
0..65535The port this Record points to. Only valid and required for SRV record requests. |
priority | integer
0..255The priority of the target host for this Record. Lower values are preferred. Only valid for MX and SRV record requests. Required for SRV record requests. Defaults to |
protocol Nullable | string The protocol this Record’s service communicates with. An underscore ( |
service Nullable | string The name of the service. An underscore ( |
tag Nullable | string Enum:
issue
issuewild
iodef The tag portion of a CAA record. Only valid and required for CAA record requests. |
target | string
<=
65535
charactersThe target for this Record. For requests, this property’s actual usage and whether it is required depends on the type of record this represents:
With the exception of A, AAAA, and CAA records, this field accepts a trailing period. |
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. For more information, see the guides on DNS Record Types. |
updated | string<date-time> When this Domain Record was last updated. |
weight | integer
0..65535The relative weight of this Record used in the case of identical priority. Higher values are preferred. Only valid and required for SRV record requests. |
errors | array
of objects
|
Domain Zone File View
Returns the zone file for the last rendered zone for the specified domain.
Authorizations
personalAccessToken | |
oauth | domains:read_only |
Path Parameters
domainId | string RequiredID of the Domain. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/domains/123/zone-file
linode-cli domains zone-file 123
Response Samples
{
"zone_file": [
"; example.com [123]",
"$TTL 864000",
"@ IN SOA ns1.linode.com. user.example.com. 2021000066 14400 14400 1209600 86400",
"@ NS ns1.linode.com.",
"@ NS ns2.linode.com.",
"@ NS ns3.linode.com.",
"@ NS ns4.linode.com.",
"@ NS ns5.linode.com."
]
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
zone_file | array
of strings The lines of the zone file for the last rendered zone for this domain. |
errors | array
of objects
|