Skip to main content
POST
/
core
/
v1
/
domains
/
{domainName}
:purchasePrivacy
Purchase Privacy
curl --request POST \
  --url https://api.dev.name.com/core/v1/domains/{domainName}:purchasePrivacy \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "purchasePrice": 123,
  "years": 1
}'
{
  "domain": {
    "domainName": "example.com",
    "createDate": "2023-01-15T14:30:00Z",
    "expireDate": "2025-01-15T14:30:00Z",
    "autorenewEnabled": true,
    "locked": true,
    "privacyEnabled": true,
    "contacts": {
      "admin": {
        "firstName": "John",
        "lastName": "Doe",
        "companyName": "Example Inc.",
        "address1": "123 Main Street",
        "address2": "Suite 400",
        "city": "New York",
        "state": "NY",
        "zip": "10001",
        "country": "US",
        "email": "john.doe@example.com",
        "phone": "+15551234567",
        "fax": "+15557654321",
        "isVerified": true
      },
      "billing": {
        "firstName": "John",
        "lastName": "Doe",
        "companyName": "Example Inc.",
        "address1": "123 Main Street",
        "address2": "Suite 400",
        "city": "New York",
        "state": "NY",
        "zip": "10001",
        "country": "US",
        "email": "john.doe@example.com",
        "phone": "+15551234567",
        "fax": "+15557654321",
        "isVerified": true
      },
      "registrant": {
        "firstName": "John",
        "lastName": "Doe",
        "companyName": "Example Inc.",
        "address1": "123 Main Street",
        "address2": "Suite 400",
        "city": "New York",
        "state": "NY",
        "zip": "10001",
        "country": "US",
        "email": "john.doe@example.com",
        "phone": "+15551234567",
        "fax": "+15557654321",
        "isVerified": true
      },
      "tech": {
        "firstName": "John",
        "lastName": "Doe",
        "companyName": "Example Inc.",
        "address1": "123 Main Street",
        "address2": "Suite 400",
        "city": "New York",
        "state": "NY",
        "zip": "10001",
        "country": "US",
        "email": "john.doe@example.com",
        "phone": "+15551234567",
        "fax": "+15557654321",
        "isVerified": true
      }
    },
    "nameservers": {
      "0": "ns1.example.com",
      "1": "ns2.example.com"
    },
    "renewalPrice": 12.99
  },
  "order": 123,
  "totalPaid": 4.99
}

Authorizations

Authorization
string
header
required

Authenticate via HTTP Basic with your account username and API token. Examples use an explicit 'Authorization: Basic <base64(username:token)>' header; 'curl -u username:token' is equivalent. For sandbox, append "-test" to your username and use your sandbox token on api.dev.name.com.

Headers

X-Idempotency-Key
string

A unique string (e.g., a UUID v4) to make the request idempotent. This key ensures that if the request is retried, the operation will not be performed multiple times. Subsequent requests with the same key will return the original result.

Example:

"083910ef-04e4-4bd1-a0bf-3737fe005ca8"

Path Parameters

domainName
string
required

DomainName is the domain to purchase Whois Privacy for.

Body

application/json

PrivacyRequest passes the domain name as well as the purchase parameters to the PurchasePrivacy function.

purchasePrice
number

PurchasePrice is the (prorated) amount you expect to pay.

years
integer
default:1

Years is the number of years you wish to purchase Whois Privacy for. Years defaults to 1 and cannot be more then the domain expiration date.

Response

A successful response.

PrivacyResponse contains the updated domain info as well as the order info for the newly purchased Whois Privacy.

order
integer
required

Order is an identifier for this purchase.

totalPaid
number
required

TotalPaid is the total amount paid, including VAT.

Example:

4.99

domain
object

The response format for a domain. Domain contains all relevant data for a domain.

I