Whois privacy API
Enable and disable WHOIS privacy on registered domains.
Retrieve the domain WHOIS privacy
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 on success
{
"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"
}
}
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"
}
}
Errors
Responds with HTTP 400 if the whois privacy cannot be enabled.
Responds with HTTP 401 in case of case of authentication issues.
Responds with HTTP 402 if the account has outstanding payments.
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"
}
}
Errors
Responds with HTTP 400 if the whois privacy cannot be disabled.
Responds with HTTP 401 in case of case of authentication issues.
Renew WHOIS privacy
POST /:account/registrar/domains/:domain/whois_privacy/renewals
Parameters
Name | Type | Description |
---|---|---|
:account |
integer |
The account id |
:domain |
string , integer
|
The domain name or id |
Example
Renew whois privacy for the domain example.com
in the account 1010
:
curl -H 'Authorization: Bearer <token>' \
-H 'Accept: application/json' \
-X POST \
https://api.dnsimple.com/v2/1010/registrar/domains/example.com/whois_privacy/renewals
Response
Responds with HTTP 201 if WHOIS privacy is renewed.
{
"data": {
"id": 1,
"domain_id": 100,
"whois_privacy_id": 999,
"state": "new",
"expires_on": "2020-01-10",
"enabled": true,
"created_at": "2019-01-10T12:12:48Z",
"updated_at": "2019-01-10T12:12:48Z"
}
}
Errors
Responds with HTTP 400 if the whois privacy cannot be renewed.
Responds with HTTP 401 in case of case of authentication issues.