Tseba hore na ho na le li-domains life tse fumanehang, ngolisa le ho nchafatsa li-domains, le ho laola li-server tsa bona tsa lebitso le ho nchafatsa ka ho toba. Li-domains li bonts'itsoe ka uuid ea tsona.
E khutlisa li-domains tse ngotsoeng akhaonteng ea hau, 25 ka leqephe. Lintlha ha li na li-filters.
Litokelo li hlokahale: domains:list
curl -X GET "https://admin.vps.org/api/v1/domains/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
url = "https://admin.vps.org/api/v1/domains/"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}
response = requests.get(url, headers=headers)
for domain in response.json()["results"]:
print(domain["domain_name"], domain["status"], domain["expiration_date"])
const response = await fetch('https://admin.vps.org/api/v1/domains/', {
headers: { 'Authorization': 'Bearer YOUR_API_TOKEN' }
});
const data = await response.json();
console.log(data.results);
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"uuid": "e4b7a2c9-1d3f-4e5a-8b6c-7d8e9f0a1b2c",
"domain_name": "example.com",
"status": "active",
"registrar": "dynadot",
"registration_date": "2026-01-15T10:30:00Z",
"expiration_date": "2027-01-15T10:30:00Z",
"days_until_expiration": 122,
"is_expired": false,
"needs_renewal_soon": false,
"auto_renew": true,
"renewal_period_years": 1,
"registration_price": "12.64",
"renewal_price": "12.64",
"whois_privacy": true,
"nameserver1": "ns1.vps.org",
"nameserver2": "ns2.vps.org",
"nameserver3": "ns3.vps.org",
"nameserver4": null,
"transfer_lock": true,
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-09-01T08:12:40Z"
}
]
}
| Setereke | Mofuta | Bophara |
|---|---|---|
uuid |
string | Setsebiso sa domain se sebelisoang ho li-endpoints tse ling tsa domain |
status |
string | active, pending, expired, cancelled, transferred |
registrar |
string | Motsamaisi oa ho ngolisa domaini e bolokiloe ho |
registration_date, expiration_date |
datetime | Ha domain e ngolisoa le ha e fela. expiration_date e ka ba null. |
days_until_expiration |
integer | null | Libeke tsohle ho fihlela ho expiration_date, negative ha e fetsoe |
is_expired, needs_renewal_soon |
boolean | Na domain e fetsoe, le hore na e fetsoe ka matsatsi a 30 a tlang |
auto_renew, renewal_period_years |
boolean, integer | Na domain e nchafatsoa ka ho toba, le hore na e tla ba lilemo tse kae |
registration_price, renewal_price |
string | Litheko ka USD e le li-strings tsa decimal |
whois_privacy, transfer_lock |
boolean | Litlhophiso tsa ho koala ho fetisa le ho koala ho khutlisa WHOIS |
nameserver1 to nameserver4 |
string | null | Li-server tsa lebitso la domain |
created_at, updated_at |
datetime | Ha e-ba le ho thehoa le ho fetoloa ha morao-rao ha lifaele (ISO 8601, UTC) |
E khutlisa ntho e le 'ngoe ea domain le libaka tse ka holimo.
Litokelo li hlokahale: domains:list
curl -X GET "https://admin.vps.org/api/v1/domains/e4b7a2c9-1d3f-4e5a-8b6c-7d8e9f0a1b2c/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
| 200 | Bophelo bo botle |
| 404 | Ha e fumanehe, kapa e na le akhaonto e 'ngoe |
E hlahloba hore na lebitso le na le ho lekana ka li-extension tse ka bang 20 tse tsebahalang (com, net, org, io, dev, co, app, ai le tse ling), le ho feta ho feta lentsoe le tšoauoang haeba le se teng. Liphetho li qala ka ho kopana ka ho nepahetseng, ka mor'a moo li-name tse fumanehang, ka mor'a moo li-name tse nkang.
Litokelo li hlokahale: domains:search
| Parameter | Mofuta | E hlokahala | Bophara |
|---|---|---|---|
domain |
string | E | Lebitso le nang le kapa le sa nang le ho eketseha, mohlala mysite kapa mysite.com (li-characters tse 2 ho isa ho tse 63) |
curl -X POST "https://admin.vps.org/api/v1/domains/search/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"domain": "mysite.com"}'
import requests
url = "https://admin.vps.org/api/v1/domains/search/"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}
response = requests.post(url, headers=headers, json={"domain": "mysite.com"})
for result in response.json()["results"]:
if result["available"]:
print(result["domain"], result["registration_price"], result["renewal_price"])
{
"results": [
{
"domain": "mysite.com",
"available": false,
"price": null,
"registration_price": null,
"renewal_price": null,
"tld": "com",
"is_exact_match": true
},
{
"domain": "mysite.dev",
"available": true,
"price": 17.24,
"registration_price": 17.24,
"renewal_price": 17.24,
"tld": "dev",
"is_exact_match": false
}
],
"base_domain": "mysite",
"search_count": 20
}
The theko ke palo ea USD bakeng sa selemo se le seng le null bakeng sa lebitso le sa fumanehang. The theko e bonts'itsoeng ke ho bonts'a.
| 200 | Bophelo bo botle |
| 400 | Domain e sa fumanehe, kapa e na le li-character tse ling ho feta li-letters, digits le hyphens |
| 500 | Ho batla register ho sa khone. Tseba hape ka mor'a moo. |
E ngolisa domaini'me e lefa tsela ea ho lefa e bolokiloeng. Bongata le theko li tla hlahlojoa le motsamaisi oa ho ngolisa hape pele ho lefa. Lintlha tsa ho ikopanya le motsamaisi oa ho ngolisa li tlatsoa ho tsoa ho ak'haonte ea hau. Haeba motsamaisi oa ho ngolisa a sa lumele ho ngolisoa ka mor'a ho lefa, lefiso le tla khutlisoa.
Litokelo li hlokahale: domains:register (e fanoeng ke li-domains: *)
| Parameter | Mofuta | E hlokahala | Bophara |
|---|---|---|---|
domain |
string | E | Lebitso la domain le felletseng le kenyeletsang leqepheng la eona, mohlala example.com |
years |
integer | Ha ho joalo | Nako ea ho ngolisa, 1 ho 10 (default 1). The theko ke selemo le selemo theko nako ea lilemo..ai hloka ka tlase ho lilemo tse 2; a tlase qeto e khutlela 400. |
curl -X POST "https://admin.vps.org/api/v1/domains/register/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"domain": "mysite.dev", "years": 1}'
{
"success": true,
"domain_uuid": "e4b7a2c9-1d3f-4e5a-8b6c-7d8e9f0a1b2c",
"domain_name": "mysite.dev",
"message": "mysite.dev registered successfully!"
}
| 201 | Domain e ngolisitsoe |
| 400 | Domain e sa nepahalang, domain e se e fumaneha, theko e ke ke ea phetheloa, tsela ea ho lefa e sa sebetsa, kapa lefiso le sa atlehe |
| 402 | Ha ho na mokhoa oa ho lefa ka faele, kapa li-invoice tse sa lefisoeng |
| 500 | The tefo ha e ka etsoa, kapa the registrar a lahla the registration kamora tefo. Ka nako ea bobeli, molaetsa oa bothata o re na tefo e ile ea tsamaea. |
E nchafatsa domain'me e lefa renewal_price ea eona selemo le selemo ka mokhoa oa ho lefa o bolokiloeng.
Litokelo li hlokahale: domains:renew
| Parameter | Mofuta | E hlokahala | Bophara |
|---|---|---|---|
years |
integer | Ha ho joalo | Lilemo ho eketsa, 1 ho 10 (difault 1) |
curl -X POST "https://admin.vps.org/api/v1/domains/e4b7a2c9-1d3f-4e5a-8b6c-7d8e9f0a1b2c/renew/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"years": 1}'
{
"success": true,
"domain_uuid": "e4b7a2c9-1d3f-4e5a-8b6c-7d8e9f0a1b2c",
"new_expiration": "2028-01-15T10:30:00+00:00",
"message": "example.com renewed successfully for 1 year(s)!"
}
| 200 | Domain e nchafatsoa |
| 400 | Lilemo tse sa nepahalang, ha ho theko ea ho nchafatsa bakeng sa domain, ha ho tsela e ka sebelisoang ea ho lefa, kapa ho lefa ho sa atlehe |
| 404 | Ha e fumanehe, kapa e na le akhaonto e 'ngoe |
| 500 | Theko ha e ka khoneha ho sebetsana, kapa theko e ile ea tsamaea empa ho nchafatsoa ha register ho sa khone. Ikopanye le tšehetso ka nako eo. |
E beha li-server tsa lebitso la domain ho registrar'me e khutlisa ntho ea domain e nchafalitsoeng. Ho laola DNS ka DNS API, sebelisa ns1.vps.org, ns2.vps.org le ns3.vps.org' me u thehe sebaka sa domain.
Litokelo li hlokahale: domains:update
| Parameter | Mofuta | E hlokahala | Bophara |
|---|---|---|---|
nameserver1 |
string | E | Lebitso la motsamaisi oa setsi sa lebitso |
nameserver2, nameserver3, nameserver4 |
string | Ha ho joalo | Li-hostname tsa nameserver tse eketsehileng |
curl -X PUT "https://admin.vps.org/api/v1/domains/e4b7a2c9-1d3f-4e5a-8b6c-7d8e9f0a1b2c/nameservers/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"nameserver1": "ns1.vps.org", "nameserver2": "ns2.vps.org", "nameserver3": "ns3.vps.org"}'
| 200 | Nameservers e nchafalitsoe;'mele ke ntho ea domain |
| 400 | nameserver1 e sa tsoa hlaha |
| 404 | Ha e fumanehe, kapa e na le akhaonto e 'ngoe |
| 500 | Ho nchafatsa ho sa khoneha;'mele o na le bothata le libaka tsa molaetsa |
E beha auto_renew'me e khutlisa ntho ea domain e nchafalitsoeng. E romella e sebetsa e le JSON boolean: lengolo-tsoibila le seng lefifi, ho kenyeletsoa lengolo-tsoibila le fosahetseng, le hokahanya ho nchafatsoa ka ho toba.
Litokelo li hlokahale: domains:update
curl -X PUT "https://admin.vps.org/api/v1/domains/e4b7a2c9-1d3f-4e5a-8b6c-7d8e9f0a1b2c/auto-renew/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"enabled": false}'
| 200 | Ho hlophisoa ho bolokiloe;'mele ke ntho ea domain |
| 400 | e se e ntse e sebetsa |
| 404 | Ha e fumanehe, kapa e na le akhaonto e 'ngoe |