Register Domain
http
POST /domains/register
Registers a new domain and charges the client’s credit balance (a premium name its premium price). 400 when the name isn’t valid, its extension isn’t offered or has no price, it isn’t available, or it’s already registered with us; 402 when the balance is too low. If the registrar doesn’t finish the registration straight away, the domain comes back pending with no expiry_date, and the charge stands.
Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| domain | string | Yes | Domain name to register | |
| years | integer | No | 1 | Registration period (1-10), brought within the terms the TLD allows |
| id_protection | boolean | No | on where the TLD offers it | WHOIS privacy |
Response (201)
json
{
"message": "Domain registered.",
"domain": "example.com",
"status": "active",
"expiry_date": "2027-03-03",
"new_balance": 129.55
}
Error (402)
json
{
"error": "Insufficient credit balance.",
"balance": 5.00,
"required": 12.95
}