API Queries - Register Domain
The register API function registers a new domain. It is recommended you use the Check Pricing function to check the domain cost and the Check Balance function to ensure your account balance is adequate before registering a new domain. The funds will be deducted from your account balance or an error will be returned if you do not have sufficient funds. Additional parameters are required for this function.
Additional Parameters
- domain - Complete domain name to register including the extention. Note: http://www. should not be included.
Your API key is required and all values should be correctly URL encoded.
Example 1
In the below example, we will register the domain "shoes.com" (domain=shoes.com). There are various errors that could be returned and need to be handled by your custom application such as insufficient funds, domain already exists or invalid domain.
Query
https://www.above.com/registrar/api/query.html?key=APIKEY&query=**register**&domain=shoes.com
Response
<results code="100">
<domains total="1" offset="0" limit="100" sort_by="domain" order="ASC">
<r domain="shoes.com">
<created>2014-05-06 03:47:40</created>
<expiry>2018-05-06 03:47:40</expiry>
<dns1>ns1.abovedomains.com</dns1>
<dns2>ns2.abovedomains.com</dns2>
<technical_contact>260152_673371</technical_contact>
<admin_contact>260152_673371</admin_contact>
<registrant_contact>260152_673371</registrant_contact>
<billing_contact>260152_673371</billing_contact>
<privacy>off</privacy>
<category></category>
<paid></paid>
<value></value>
<keyword></keyword>
<autorenew>off</autorenew>
<status>ok</status>
<lock>On</lock>
</r>
</domains>
</results>
Note: Upon successful registration of a domain, our API returns code 100 to indicate success and the current domain details, similar to using the Manage Domains function.
Example 2 - Unsupported domain extension
In this example we will attempt to register a .com.au domain which is not supported by Above.com Registrar. We will use domain "clothes.com.au" (domain=clothes.com.au).
Query
https://www.above.com/registrar/api/query.html?key=APIKEY&query=**register**&domain=clothes.com.au
Response
<results code="605">
<msg>TLD not supported by Above.com</msg>
</results>
Error Codes
Possible error responses for this function are:
508 - Insufficient balance
510 - Domain not specified or invalid domain
512 - Domain extension must be specified
513 - Multiple domains not supported
532 - Multiple connections to API not allowed
601 - Registration failed - domain already registered
602 - Registration failed - internal error
604 - Domain already queued to be registered
605 - TLD not supported by Above.com
606 - No TLD default contact set
607 - Invalid details in domain contact
608 - Domain not available
609 - Declined - Register Number Limit Reached (domain registration limit reached for 24h period)
General errors, such as 401 - Invalid API key or 500 - System unavailable. For a complete list of error responses, see the Error Codes manual page.