Vanity Name Servers API

The vanity name servers feature is only available for certain plans. If the feature is not enabled, you will receive an HTTP 412 response code.

Enable

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"
    }
  ]
}

Responds with HTTP 400 if bad request.

Disable

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.

Responds with HTTP 400 if bad request.