Domains API
This API enables management of domains registered with Mythic Beasts.
Authentication and authorisation
This API uses our auth service. Credentials for using this API can be obtained from the API Keys section of the control panel.
Authentication for the DNS API can be done using a "Bearer token". In this, you provide your credentials to the auth service which will return a token which can be used in subsequent requests. See the documentation for the auth service for more details.
API Keys can be limited to accessing individual domains, or all domains on your account. API Keys can be read-only, or given access to make changes to your domains. The permissions that can be added to a key currently are:
- NS - API Key can update the nameservers for the domain(s)
- DNSSEC - API Key can update the DS records for the domain(s)
Granting either of the above permissions to an API Key will also give the key the ability enable and disable domain locking, if the domain type supports it.
The base URL for this service is:
- https://api.mythic-beasts.com/beta
The endpoints listed below should be appended to the above URL.
Endpoints
get /domains
List all domains to which the current API key has at least some level of access.
If the key has any permission that is not restricted by domain, it will list all zones on the customer account.
Responses
Code | Description | ||||
---|---|---|---|---|---|
200 | List of domains application/json
Example
|
||||
403 | Not authorised |
get /domains/{domain}
Returns information about the specified domain.
Parameters
Name | Location | Description |
---|---|---|
domain string | path |
The domain name |
Responses
Code | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 | Domain information. Status is one of the following values:
application/json
Example
|
||||||||||||||
403 | Not authorised |
get /domains/{domain}/nameservers
Returns a list of nameservers for the domain. Each nameserver will have a name, and optionally an IPv4 and/or IPv6 address.
Parameters
Name | Location | Description |
---|---|---|
domain string | path |
The domain name |
Responses
Code | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 | Nameserver information. application/json
Example
|
||||||||||||
400 | Bad request application/json
Example
|
||||||||||||
403 | Not authorised |
put /domains/{domain}/nameservers
Update the nameservers for a domain. Accepts a list of between 2 and 10 nameservers, which will replace the current nameservers. If the hostname of a nameserver is within the domain for which you are setting nameservers, you should provide an IPv4 and/or IPv6 address which will be used to create the necessary glue records.
This action requires an API Key with the NS permission.
Parameters
Name | Location | Description |
---|---|---|
domain string | path |
The domain name |
Request Body JSON
Name | Description |
---|---|
nameservers array |
(Required) List of nameservers |
name string |
(Required) Hostname of nameservers |
ipv4 number |
(Optional) IPv4 address for nameservers. Will be ignored unless needed for glue records (nameserver hostname is within the current domain name). |
ipv6 string |
(Optional) IPv6 address for nameservers. Will be ignored unless needed for glue records (nameserver hostname is within the current domain name). |
Example
application/json
{
"nameservers": [
{
"name": "ns1.example.com",
"ipv4": "45.33.127.156",
"ipv6": "2600:3c00:e000:19::1"
}
]
}
Responses
Code | Description | ||||||
---|---|---|---|---|---|---|---|
200 | Success application/json
Example
|
||||||
400 | Bad request application/json
Example
|
||||||
403 | Not authorised |
get /domains/{domain}/ds
Returns a list of the domain's DS records.
Parameters
Name | Location | Description |
---|---|---|
domain string | path |
The domain name |
Responses
Code | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 | DS records application/json
Example
|
||||||||||||||
400 | Bad request application/json
Example
|
||||||||||||||
403 | Not authorised |
put /domains/{domain}/ds
Set the DS records for the domain. This will replace all current DS records for the domain with those provided in the request.
This action requires an API Key with the DNSSEC permission.
Parameters
Name | Location | Description |
---|---|---|
domain string | path |
The domain name |
Request Body JSON
Name | Description |
---|---|
records array |
(Required) List of DS records |
key_tag integer |
(Required) Key tag field |
algorithm integer |
(Required) Algorithm field |
digest_type integer |
(Required) Digest type field |
digest string |
(Required) Digest field |
Example
application/json
{
"records": [
{
"key_tag": 7962,
"algorithm": 10,
"digest_type": 2,
"digest": "608EEB2F566855F6590F6EFF9C3EF96E8B7C07A0F1443BA95077A3CDA383F8D8"
}
]
}
Responses
Code | Description | ||||||
---|---|---|---|---|---|---|---|
200 | Success application/json
Example
|
||||||
400 | Bad request application/json
Example
|
||||||
403 | Not authorised |
get /domains/{domain}/lock
Gets the domain lock state (prevents modifications to do the domain if enabled).
Domain locking is not supported on all domain types. This endpoint will return a 400
status if domain locking is not supported.
Parameters
Name | Location | Description |
---|---|---|
domain string | path |
The domain name |
Responses
Code | Description | ||||||
---|---|---|---|---|---|---|---|
200 | Domain lock state application/json
Example
|
||||||
400 | Bad request application/json
Example
|
||||||
403 | Not authorised |
put /domains/{domain}/lock
Sets the domain lock state (prevents modifications to do the domain if enabled).
Domain locking is not supported on all domain types. This endpoint will return a 400
status if domain locking is not supported.
This action requires an API Key with either the DNSSEC or NS permission.
Parameters
Name | Location | Description |
---|---|---|
domain string | path |
The domain name |
Request Body JSON
Name | Description |
---|---|
lock boolean |
(Required) Domain lock state |
Example
application/json
{
"lock": true
}
Responses
Code | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 | Nameserver information. application/json
Example
|
||||||||||||
400 | Bad request application/json
Example
|
||||||||||||
403 | Not authorised |
get /domains/{domain}/dns
Indicates whether DNS service is currently active for this domain.
Parameters
Name | Location | Description |
---|---|---|
domain string | path |
The domain name |
Responses
Code | Description | ||||||
---|---|---|---|---|---|---|---|
200 | DNS service state application/json
Example
|
||||||
403 | Not authorised |
put /domains/{domain}/dns
Enable or disable DNS hosting for this domain.
DNS hosting is unsupported on domains that are already configured for secondary DNS hosting.
This action requires an API Key with the NS permission.
Parameters
Name | Location | Description |
---|---|---|
domain string | path |
The domain name |
Request Body JSON
Name | Description |
---|---|
dns boolean |
(Required) DNS service status |
Example
application/json
{
"dns": true
}
Responses
Code | Description | ||||||
---|---|---|---|---|---|---|---|
200 | DNS service state application/json
Example
|
||||||
400 | Bad request application/json
Example
|
||||||
403 | Not authorised |
get /domains/{domain}/dnssec
Gets the status of managed DNSSEC service on this domain. Managed DNSSEC is available on domains registered with Mythic Beasts, and automatically sets and updates DS keys for the domain, as well as providing signed DNS responses.
Parameters
Name | Location | Description |
---|---|---|
domain string | path |
The domain name |
Responses
Code | Description | ||||||
---|---|---|---|---|---|---|---|
200 | Managed DNSSEC state application/json
Example
|
||||||
403 | Not authorised |
put /domains/{domain}/dnssec
Enable managed DNSSEC for this domain.
Please note that DNSSEC cannot currently be disabled automatically. You will need to contact support if you wish to disable it.
This action requires an API Key with the DNSSEC permission.
Parameters
Name | Location | Description |
---|---|---|
domain string | path |
The domain name |
Request Body JSON
Name | Description |
---|---|
dnssec boolean |
(Required) DNSSEC status |
Example
application/json
{
"dnssec": true
}
Responses
Code | Description | ||||||
---|---|---|---|---|---|---|---|
200 | Managed DNSSEC state application/json
Example
|
||||||
400 | Bad request application/json
Example
|
||||||
403 | Not authorised |
Common errors
Code | Description | ||||
---|---|---|---|---|---|
403 | Not authorised to access domain or domain does not exist. application/json
Example
|