List Domains
GET /domains/
Responses
- 200 list[DomainOut]
- 401 no key, or a key that was revoked
- 403 the key lacks the permission
Example request
curl -X GET "$API/domains/" \
-H "Authorization: Bearer $LH_API_KEY"
Check, register, move in, renew and manage names. Paid calls charge the wallet at once.
Every call needs Authorization: Bearer lh_… unless marked No key needed; the example uses $API for https://api.localhost.co.zw and $LH_API_KEY for your key. A * marks a required field.
GET /domains/
curl -X GET "$API/domains/" \
-H "Authorization: Bearer $LH_API_KEY"
POST /domains/
Register a name, paid now from the wallet. The registry finishes it later (status pending -> active).
| Name | Type | Notes |
|---|---|---|
| name * | string | |
| nameservers | list[string] | default [] |
| registrant | object of string | default {} |
| auto_renew | boolean | default true |
| pay_from | string | default account |
curl -X POST "$API/domains/" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Idempotency-Key: <a fresh unique string>" \
-H "Content-Type: application/json" \
-d '{
"name": "<name>"
}'
GET /domains/check
Up to 20 comma-separated names. `price` is what this account pays (partner prices applied).
| Name | Type | Notes |
|---|---|---|
| names * query | string |
curl -X GET "$API/domains/check?names=<names>" \
-H "Authorization: Bearer $LH_API_KEY"
GET /domains/prices
Every ending we sell, at this account's prices.
curl -X GET "$API/domains/prices" \
-H "Authorization: Bearer $LH_API_KEY"
POST /domains/transfers
Move a name here from another provider, paid now (free for the .zw endings).
| Name | Type | Notes |
|---|---|---|
| name * | string | |
| auth_code | string | default "" |
| owner_email | string | default "" |
curl -X POST "$API/domains/transfers" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Idempotency-Key: <a fresh unique string>" \
-H "Content-Type: application/json" \
-d '{
"name": "<name>"
}'
GET /domains/{name}
| Name | Type | Notes |
|---|---|---|
| name * in path | string |
curl -X GET "$API/domains/<name>" \
-H "Authorization: Bearer $LH_API_KEY"
GET /domains/{name}/auth-code
The transfer code, for moving the name away. Needs domains:write.
| Name | Type | Notes |
|---|---|---|
| name * in path | string |
curl -X GET "$API/domains/<name>/auth-code" \
-H "Authorization: Bearer $LH_API_KEY"
PUT /domains/{name}/auto-renew
| Name | Type | Notes |
|---|---|---|
| name * in path | string |
| Name | Type | Notes |
|---|---|---|
| on * | boolean |
curl -X PUT "$API/domains/<name>/auto-renew" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"on": true
}'
GET /domains/{name}/contacts
| Name | Type | Notes |
|---|---|---|
| name * in path | string |
curl -X GET "$API/domains/<name>/contacts" \
-H "Authorization: Bearer $LH_API_KEY"
PUT /domains/{name}/contacts
Owner details. While a new name waits for them they're saved and, once complete, submitted: they lock and the
registration goes (200). Pass ?submit=false to save them for checking first, then POST /{name}/contacts/submit,
the way the website asks the owner. On a registered name the change is sent to the registry (202) and
shows here once it confirms; GET /{name}/operations follows it.
| Name | Type | Notes |
|---|---|---|
| name * in path | string | |
| submit query | boolean | default true |
curl -X PUT "$API/domains/<name>/contacts" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
PUT /domains/{name}/lock
| Name | Type | Notes |
|---|---|---|
| name * in path | string |
| Name | Type | Notes |
|---|---|---|
| on * | boolean |
curl -X PUT "$API/domains/<name>/lock" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"on": true
}'
PUT /domains/{name}/nameservers
| Name | Type | Notes |
|---|---|---|
| name * in path | string |
| Name | Type | Notes |
|---|---|---|
| nameservers * | list[string] |
curl -X PUT "$API/domains/<name>/nameservers" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"nameservers": [
"<nameservers>"
]
}'
GET /domains/{name}/operations
What has been asked of the registry for this name, newest first.
| Name | Type | Notes |
|---|---|---|
| name * in path | string |
curl -X GET "$API/domains/<name>/operations" \
-H "Authorization: Bearer $LH_API_KEY"
POST /domains/{name}/renew
Renew ahead for 1-5 years, paid now. The new expiry shows once the registry confirms.
| Name | Type | Notes |
|---|---|---|
| name * in path | string |
| Name | Type | Notes |
|---|---|---|
| years | integer | default 1 |
| pay_from | string | default account |
curl -X POST "$API/domains/<name>/renew" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Idempotency-Key: <a fresh unique string>" \
-H "Content-Type: application/json" \
-d '{
"years": 1,
"pay_from": "account"
}'
POST /domains/{name}/contacts/submit
Submit a new name's owner details as they are: they lock, and the registration goes.
| Name | Type | Notes |
|---|---|---|
| name * in path | string |
curl -X POST "$API/domains/<name>/contacts/submit" \
-H "Authorization: Bearer $LH_API_KEY"
The objects these endpoints send and receive.
| Name | Type | Notes |
|---|---|---|
| name * | string | |
| auth_code * | string |
| Name | Type | Notes |
|---|---|---|
| name * | string | |
| available * | boolean | null | |
| status * | string | |
| price * | string | null | |
| list_price * | string | null | |
| currency | string | default USD |
| needs_transfer_code * | boolean |
| Name | Type | Notes |
|---|---|---|
| name * | string | |
| tld * | string | |
| status * | string | |
| nameservers * | list[string] | |
| auto_renew * | boolean | |
| locked * | boolean | |
| registered_at * | datetime | null | |
| expires_at * | datetime | null |
| Name | Type | Notes |
|---|---|---|
| nameservers * | list[string] |
| Name | Type | Notes |
|---|---|---|
| id * | integer | |
| op * | string | |
| state * | string | |
| note * | string | |
| created_at * | datetime | |
| completed_at * | datetime | null |
| Name | Type | Notes |
|---|---|---|
| domain * | DomainOut | |
| invoice * | string | |
| charged * | string | |
| currency * | string | |
| next_step * | string |
| Name | Type | Notes |
|---|---|---|
| kind * | string | |
| ref * | string | |
| list_price * | string | |
| your_price * | string | |
| client_price * | string | |
| period * | string |
| Name | Type | Notes |
|---|---|---|
| name * | string | |
| nameservers | list[string] | default [] |
| registrant | object of string | default {} |
| auto_renew | boolean | default true |
| pay_from | string | default account |
| Name | Type | Notes |
|---|---|---|
| years | integer | default 1 |
| pay_from | string | default account |
| Name | Type | Notes |
|---|---|---|
| on * | boolean |
| Name | Type | Notes |
|---|---|---|
| name * | string | |
| auth_code | string | default "" |
| owner_email | string | default "" |