Skip to main content
POST
/
order
/
domains
/
register
Register Domain
curl --request POST \
  --url https://vicem.com/modules/addons/DomainsReseller/api/index.php/order/domains/register \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --header 'token: <token>' \
  --header 'username: <username>' \
  --data domain=example.com \
  --data regperiod=1 \
  --data 'nameservers={
  "ns1": "ns1.example.com",
  "ns2": "ns2.example.com",
  "ns3": "<string>",
  "ns4": "<string>",
  "ns5": "<string>"
}' \
  --data 'contacts={
  "Registrant": {},
  "Admin": {},
  "Tech": {},
  "Billing": {}
}' \
  --data 'addons={
  "dnsmanagement": false,
  "emailforwarding": false,
  "idprotection": false
}' \
  --data 'domainfields=<string>' \
  --data 'idnLanguage=<string>' \
  --data 'originalvars={}'
"success"

Headers

username
string<email>
required

Reseller email address registered in WHMCS

token
string
required

HMAC-SHA256 authentication token.

PHP formula: base64_encode(hash_hmac('sha256', $apiKey, $email . ':' . gmdate('y-m-d H')))

Important: hash_hmac without the 3rd parameter true (returns hex, not binary), then base64_encode of the hex result. The token is 88 characters long.

An optional timestamp header (Unix timestamp, 60-second tolerance) can be sent to synchronize time.

Example:

"YTk4YjRmNjI..."

Body

application/x-www-form-urlencoded
domain
string
required

Full domain name to register

Example:

"example.com"

regperiod
integer
required

Registration period in years

Example:

1

nameservers
object
required
contacts
object
required

WHOIS contacts. Keys: Registrant (required), Admin, Tech, Billing. Each value is a key-value object of contact fields.

addons
object

Domain addons. Each key is an addon name, value is a boolean indicating whether it is enabled.

domainfields
string

TLD-specific additional fields, encoded as base64(serialize(array))

idnLanguage
string

Language code for IDN domains

originalvars
object

Original parameters from the reseller WHMCS (stored for registration)

Response

Success - Returns "success"

The response is of type string.

Example:

"success"