API Queries - Privacy
The privacy API function sets privacy on or off for a domain or set of domains. Note that privacy is not allowed for some TLDs for legal reasons. Additional parameters are required for this function.
Additional Parameters
- domain - Domain name to updated. Note: http://www. should not be included.
- set_privacy - Accepted values are "on" and "off".
Your API key is required and all values should be correctly URL encoded.
Example
In the below example, we will turn on privacy for the domain "grapes.com" (domain=grapes.com&set_privacy=on).
Query
https://www.above.com/registrar/api/query.html?key=APIKEY&query=privacy&domain=grapes.com&set_privacy=on
Response
<results code="100" />
Example 2
Privacy is not allowed on some TLDs for legal reasons. In this example, we will attempt to turn on privacy for "oranges.de" (domain=oranges.de&set_privacy=on).
Query
https://www.above.com/registrar/api/query.html?key=APIKEY&query=privacy&domain=oranges.de&set_privacy=on
Response
<results code="704"> <msg>Privacy not allowed for this TLD</msg> </results>
Error Codes
Possible error responses for this function are:
- 509 - Specified domain is not in your account
- 510 - Domain not specified or invalid domain
- 512 - Domain extension must be specified
- 701 - Privacy value not specified. Please specify on or off
- 702 - Privacy value invalid. Please specify on or off
- 704 - Privacy not allowed for this TLD
- General errors, such as 401 - Invalid API key or 500 - System unavailable.