Vanity Name Servers API

The vanity name servers is a feature that is only available to the Enterprise plan. If the feature is not enabled, you will receive an HTTP 412 response code.

Enable vanity name servers

PUT /:account/vanity/:domain

Enable Vanity Name Servers for the domain. This method sets up the appropriate A and AAAA records for the domain to provide vanity name servers, but it does not change the delegation for the domain. To change the delegation for domains to vanity name servers use the endpoints to Delegate to Vanity Name Servers or Dedelegate from Vanity Name Servers.

Parameters

Name Type Description
:account integer The account id
:domain string, integer The domain name or id

Example

Enable Vanity Name Servers for the domain example.com in the account 1010:

curl  -H 'Authorization: Bearer <token>' \
      -H 'Accept: application/json' \
      -H 'Content-Type: application/json' \
      -X PUT \
      https://api.dnsimple.com/v2/1010/vanity/example.com

Response

Responds with HTTP 200 on success.

{
  "data": [
    {
      "id": 1,
      "name": "ns1.example.com",
      "ipv4": "127.0.0.1",
      "ipv6": "::1",
      "created_at": "2016-07-14T13:22:17Z",
      "updated_at": "2016-07-14T13:22:17Z"
    },
    {
      "id": 2,
      "name": "ns2.example.com",
      "ipv4": "127.0.0.1",
      "ipv6": "::1",
      "created_at": "2016-07-14T13:22:17Z",
      "updated_at": "2016-07-14T13:22:17Z"
    },
    {
      "id": 3,
      "name": "ns3.example.com",
      "ipv4": "127.0.0.1",
      "ipv6": "::1",
      "created_at": "2016-07-14T13:22:17Z",
      "updated_at": "2016-07-14T13:22:17Z"
    },
    {
      "id": 4,
      "name": "ns4.example.com",
      "ipv4": "127.0.0.1",
      "ipv6": "::1",
      "created_at": "2016-07-14T13:22:17Z",
      "updated_at": "2016-07-14T13:22:17Z"
    }
  ]
}

Errors

Responds with HTTP 400 if vanity name servers cannot be enabled.

Responds with HTTP 401 in case of case of authentication issues.

Responds with HTTP 402 if the account has outstanding payments.

Responds with HTTP 412 if the account doesn’t have access to the vanity name server feature.

Disable vanity name servers

DELETE /:account/vanity/:domain

Disable Vanity Name Servers for the domain. This method removes the A and AAAA records required for the domain to provide vanity name servers, but it does not change the delegation for the domain. To change the delegation for domains to vanity name servers use the endpoints to Delegate to Vanity Name Servers or Dedelegate from Vanity Name Servers.

Parameters

Name Type Description
:account integer The account id
:domain string, integer The domain name or id

Example

Enable Vanity Name Servers for the domain example.com in the account 1010:

curl  -H 'Authorization: Bearer <token>' \
      -H 'Accept: application/json' \
      -H 'Content-Type: application/json' \
      -X DELETE \
      https://api.dnsimple.com/v2/1010/vanity/example.com

Response

Responds with HTTP 204 on success.

Errors

Responds with HTTP 400 if vanity name servers cannot be disabled.

Responds with HTTP 401 in case of case of authentication issues.

Responds with HTTP 402 if the account has outstanding payments.

Responds with HTTP 412 if the account doesn’t have access to the vanity name server feature.