Name servers and delegation API

Retrieve and manage delegation for a domain in DNSimple.

List name servers for a domain

GET /:account/registrar/domains/:domain/delegation

List name servers for the domain in the account.

Parameters

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

Example

List name servers for the domain example.com in the account 1010:

curl  -H 'Authorization: Bearer <token>' \
      -H 'Accept: application/json' \
      https://api.dnsimple.com/v2/1010/registrar/domains/example.com/delegation

Response

Responds with HTTP 200.

{
  "data": [
    "ns1.dnsimple.com",
    "ns2.dnsimple.com",
    "ns3.dnsimple.com",
    "ns4.dnsimple.com"
  ]
}

Update name servers for a domain

PUT /:account/registrar/domains/:domain/delegation

Parameters

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

Example

Update 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 \
      -d '["ns1.example.com","ns2.example.com"]' \
      https://api.dnsimple.com/v2/1010/registrar/domains/example.com/delegation

Input

Name Type Description
  array Required A list of name server names as strings.
Example
[
  "ns1.example.com",
  "ns2.example.com"
]

Response

Responds with HTTP 200 on success, renders the list of name server names.

{
  "data": [
    "ns1.dnsimple.com",
    "ns2.dnsimple.com",
    "ns3.dnsimple.com",
    "ns4.dnsimple.com"
  ]
}

Responds with HTTP 400 if bad request.

Responds with HTTP 400 if the delegation fails.

Delegate to Vanity Name Servers

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

PUT /:account/registrar/domains/:domain/delegation/vanity

Parameters

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

Input

Name Type Description
  array Required A list of name server names as strings.

Example

Update 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 \
      -d '["ns1.example.com","ns2.example.com"]' \
      https://api.dnsimple.com/v2/1010/registrar/domains/example.com/delegation/vanity

Response

Responds with HTTP 200 on success, renders the list of name server names.

{
  "data": [
    {
      "id": 1,
      "name": "ns1.example.com",
      "ipv4": "127.0.0.1",
      "ipv6": "::1",
      "created_at": "2016-07-11T09:40:19Z",
      "updated_at": "2016-07-11T09:40:19Z"
    },
    {
      "id": 2,
      "name": "ns2.example.com",
      "ipv4": "127.0.0.1",
      "ipv6": "::1",
      "created_at": "2016-07-11T09:40:19Z",
      "updated_at": "2016-07-11T09:40:19Z"
    }
  ]
}

Responds with HTTP 400 if bad request.

Responds with HTTP 400 if the delegation fails.

Responds with HTTP 412 if the feature is not enabled for the account.

Dedelegate from Vanity Name Servers

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

DELETE /:account/registrar/domains/:domain/delegation/vanity

Parameters

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

Example

Update name servers for the domain example.com in the account 1010:

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

Response

Responds with HTTP 204 on success.

Responds with HTTP 400 if bad request.

Responds with HTTP 400 if the dedelegation fails.

Responds with HTTP 412 if the feature is not enabled for the account.