Domain Registration
POST /order/domains/register
Registers a domain name.
This operation changes registry/account state and may incur a charge. Use only a controlled domain and account.
Authentication
Send the username and token headers described in Authentication.
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
domain | string | Yes | Domain to register. | example.invalid |
regperiod | integer | Yes | Requested registration period. Supported values require validation. | 1 |
nameservers[] | array of strings | Yes | One form field per nameserver value. Count constraints require validation. | ns1.example.net |
contacts | object | Yes | Container for nested contact data. | contacts[registrant][...] |
contacts[registrant][firstname] | string | Yes | Registrant first name. | John |
contacts[registrant][lastname] | string | Yes | Registrant last name. | Smith |
contacts[registrant][fullname] | string | Yes | Registrant full name. | John Smith |
contacts[registrant][companyname] | string | Yes | Registrant organization/company value. Individual-contact rules require validation. | Example Company |
contacts[registrant][email] | string | Yes | Registrant email address. | [email protected] |
contacts[registrant][address1] | string | Yes | Primary street address. | 1 Example Street |
contacts[registrant][address2] | string | No | Secondary address information. | Suite 2 |
contacts[registrant][city] | string | Yes | City or locality. | Tripoli |
contacts[registrant][state] | string | Yes | State, province, or region value. Rules require validation. | TR |
contacts[registrant][postcode] | string | Yes | Postal or ZIP code. Rules require validation. | 00000 |
contacts[registrant][country] | string | Yes | Two-letter country code according to the published schema. | LY |
contacts[registrant][phonenumber] | string | Yes | Registrant phone number. Format requires validation. | +218000000000 |
Requiredness above reflects the current OpenAPI. It does not establish TLD-specific overrides or field validators.
Complete Request
curl --request POST \
--url "https://my.register.ly/modules/addons/DomainsReseller/api/index.php/order/domains/register" \
--header "Content-Type: application/x-www-form-urlencoded" \
--header "token: <generated-token>" \
--data-urlencode "domain=example.invalid" \
--data-urlencode "regperiod=1" \
--data-urlencode "nameservers[]=ns1.example.net" \
--data-urlencode "nameservers[]=ns2.example.net" \
--data-urlencode "contacts[registrant][firstname]=John" \
--data-urlencode "contacts[registrant][lastname]=Smith" \
--data-urlencode "contacts[registrant][fullname]=John Smith" \
--data-urlencode "contacts[registrant][companyname]=Example Company" \
--data-urlencode "contacts[registrant][address1]=1 Example Street" \
--data-urlencode "contacts[registrant][address2]=" \
--data-urlencode "contacts[registrant][city]=Tripoli" \
--data-urlencode "contacts[registrant][state]=TR" \
--data-urlencode "contacts[registrant][postcode]=00000" \
--data-urlencode "contacts[registrant][country]=LY" \
--data-urlencode "contacts[registrant][phonenumber]=+218000000000"
The .invalid top-level domain is deliberately non-registrable, so this request illustrates serialization without risking a real registration. Replace it only with an approved controlled test domain.
Success Response (200)
"success"
Error Response (400)
The OpenAPI associates this example with HTTP 400:
{
"error": "Registrar Error: \nObject exists; Domain is: newdomain.test.ly requested by client: registrar_test"
}
Notes
VALIDATION REQUIRED: Valid regperiod values.
VALIDATION REQUIRED: TLD-specific contact requirements, phone formatting, postal/state rules, and individual-versus-organization requirements.
VALIDATION REQUIRED: Whether "success" means final registry completion or successful request processing.
VALIDATION REQUIRED: Whether an identical registration retry is idempotent.
A successful availability lookup does not reserve the domain. Registration may still fail if the domain state changes before the registration request completes.
If the client times out, reconcile availability, domain state, and account transactions before retrying. A blind retry could duplicate a state-changing request or charge.