Function   /domain/add

Function invocation

Function description

Register domain.

Input parameters

This function takes the following input parameters:

ParameterTypeRequiredDefault valueDescription
domain string "" Domain name to register (deprecated, please use 'name' parameter)
name string YES Domain name to register
contactId integer 0 Contact profile id to use for registration (/contact/list)
contact_id integer 0 Contact profile id to use for registration (deprecated, please use 'contactId' parameter)
folder_id integer 0 Folder id to use to store registered domain (deprecated and unused)
ns string[] [] Pointing nameservers for example ['', ''])
ips string[] [] Optional IP Addresses for pointing nameserver
private boolean false Domain WHOIS privacy setting
tags string "" Domain tags, separeted by commas
years integer 0 Years (deprecated and unused, please use 'period' parameter)
period integer 1 Registration period in years, depends on domain TLD, for most domains allowed values are from 1 to 10, default 1 year.
useCode boolean false Use bonus code

Return value

Domain registration result (structure with the following fields):

Field nameTypeDescription
amount float Optional amount
currency string Currency of optional amount
msg string Status message (deprecated)
myAmount float Amount in member currency of optional amount
myCurrency string Member's currency
name string Domain name (in Punycode)
nameIDN string Domain name (internationalized)