Whois privacy API

Enable and disable WHOIS privacy on registered domains.

Get WHOIS privacy for a domain

GET /:account/registrar/domains/:domain/whois_privacy

Get the WHOIS privacy details for a domain.

Parameters

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

Example

Get the WHOIS privacy 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/whois_privacy

Response

Responds with HTTP 200 if WHOIS privacy is purchased for the domain.

{
  "data": {
    "id": 1,
    "domain_id": 2,
    "expires_on": "2017-02-13",
    "enabled": true,
    "created_at": "2016-02-13T14:34:50Z",
    "updated_at": "2016-02-13T14:34:52Z"
  }
}

Responds with HTTP 404 if WHOIS privacy is not purchased.

Enable whois privacy

  PUT /:account/registrar/domains/:domain/whois_privacy

Note that if the WHOIS privacy is not purchased for the domain, enabling WHOIS privacy will cause the service to be purchased for a period of 1 year.

If WHOIS privacy was previously purchased and disabled, then calling this will enable the WHOIS privacy.

Parameters

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

Example

Enable WHOIS privacy for the domain example.com in the account 1010:

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

Response

Responds with HTTP 201 if WHOIS privacy is purchased and enabled.

Responds with HTTP 200 if WHOIS privacy is only enabled because it was purchased previously.

{
  "data": {
    "id": 1,
    "domain_id": 2,
    "expires_on": "2017-02-13",
    "enabled": true,
    "created_at": "2016-02-13T14:34:50Z",
    "updated_at": "2016-02-13T14:36:48Z"
  }
}

Disable whois privacy

  DELETE /:account/registrar/domains/:domain/whois_privacy

Note that if the WHOIS privacy is not purchased for the domain, this method will do nothing.

If WHOIS privacy was previously purchased and enabled, then calling this will disable the WHOIS privacy.

Parameters

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

Example

Disable whois privacy 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/whois_privacy

Response

Responds with HTTP 200 if WHOIS privacy is disabled.

{
  "data": {
    "id": 1,
    "domain_id": 2,
    "expires_on": "2017-02-13",
    "enabled": false,
    "created_at": "2016-02-13T14:34:50Z",
    "updated_at": "2016-02-13T14:36:38Z"
  }
}