Skip to main content
POST
/
core
/
v1
/
domains
curl --request POST \
--url https://api.dev.name.com/core/v1/domains \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"domain": {
"domainName": "example.com"
}
}'
{
"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": 123
}

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"

Body

application/json

CreateDomainRequest has the information that is needed to create a domain with the CreateDomain function.

domain
object
required

The payload to be sent for when making a request to purchase a domain. Domain contains all relevant data for a domain.

purchasePrice
number

PurchasePrice is the price in USD for purchasing this domain for the minimum time period (typically 1 year). PurchasePrice is required if purchaseType is not "registration" or if it is a premium domain. If privacyEnabled is set, the regular price for Whois Privacy protection will be added automatically. If VAT tax applies, it will also be added automatically.

purchaseType
string

PurchaseType defaults to "registration" but should be copied from the result of either a Search or checkAvailability request.

tldRequirements
object

TLDRequirements is a way to pass additional data that is required by some registries. You can check before registration by using the Domain Info API. As these requirements vary wildly between registries and TLDs, we are not attempting to document them here.

IDN Domains

This parameter is required for registering domains that contain non-ASCII characters. The value should be the specific code for the character set, such as ES for Spanish, or CYRL for Cyrillic. These abbreviations can vary between TLDs, and it is highly recommended that you use Domain Info API to ensure that the TLD allows for the specific IDN table, as well as the correct abbreviation.

years
integer

Years specifies how many years to register the domain for. Years defaults to the minimum time period (typically 1 year) if not passed and cannot be more than 10. Some TLDs default to longer initial periods (e.g. .AI requires a 2 year registration). If passing purchasePrice make sure to adjust it accordingly.

Example:

1

Response

A successful response.

CreateDomainResponse contains the domain info as well as the order info for the created domain.

domain
object
required

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

order
integer
required

Order is an identifier for this purchase.

totalPaid
number
required

TotalPaid is the total amount paid, including VAT and Whois privacy protection.

I