WHOIS privacy API
Enable and disable WHOIS privacy on registered domains.
Now you can enable WHOIS Privacy protection for any of your domains any time. As long as the domain is registered with us, and the TLD (Top Level Domain) supports WHOIS Privacy, the WHOIS Privacy service will stay enabled unless you disable it.
Retrieve the domain WHOIS privacy
GET /:account/registrar/domains/:domain/whois_privacy
Get the WHOIS privacy details for a domain.
The deprecation period for this endpoint began 01 May 2023.
You can retrieve a domain WHOIS privacy state through retrieve domain
Parameters
Name | Type | Description |
---|---|---|
:account |
integer |
The account id |
:domain |
string , integer
|
The domain name or id |
Example
Get 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
Enable the WHOIS privacy service.
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 200 if WHOIS privacy is enabled.
Responds with HTTP 201 if WHOIS privacy is only enabled because it was purchased previously. Response available only on legacy domains.
{
"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 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. Response available only on legacy domains.
Disable WHOIS privacy
DELETE /:account/registrar/domains/:domain/whois_privacy
Disable the WHOIS privacy service.
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 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
The deprecation period for this endpoint began on 01 May 2023.
You no longer need to renew the WHOIS privacy service. It will stay enabled unless you disable it.
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 WHOIS privacy cannot be renewed.
Responds with HTTP 401 in case of case of authentication issues.