POST
/
domains
/
register
curl --request POST \
  --url https://api.hostwithdothost.com/domains/register \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "domain": "example.com",
  "period": 1,
  "nameservers": [
    "ns1.example.com",
    "ns2.example.com"
  ],
  "privacyProtection": true
}'

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
domain
string
required

The domain name to be registered

Example:

"example.com"

period
number
required

The registration period for the domain, in years

Example:

1

nameservers
string[]
required

List of nameservers for the domain

Example:
["ns1.example.com", "ns2.example.com"]
privacyProtection
boolean
required

Flag indicating if privacy protection is enabled for the domain

Example:

true