VPS.org API

ឯកសារ REST API

ដែន API

គ្រប់គ្រងការចុះឈ្មោះដែន ការបន្ត និងការកំណត់រចនាសម្ព័ន្ធតាមកម្មវិធី។

ចំណុចបញ្ចប់ 6 endpoints
ផ្លូវមូលដ្ឋាន /api/v1/domains
ទទួលបាន /api/v1/domains/

រាយបញ្ជីដែនទាំងអស់

យក​បញ្ជី​ដែន​ទាំងអស់​ដែល​បាន​ចុះឈ្មោះ​នៅ​ក្រោម​គណនី​របស់​អ្នក & # 160; ។

ប៉ារ៉ាម៉ែត្រសំណួរ

ប៉ារ៉ាម៉ែត្រ ប្រភេទ តម្រូវឲ្យមាន សេចក្ដី​ពិពណ៌នា
status string គ្មាន Filter by status: active, pending, expired, locked
search string គ្មាន ស្វែងរកដែនតាមឈ្មោះ

សំណើឧទាហរណ៍

cURL
Python
JavaScript
curl -X GET "https://admin.vps.org/api/v1/domains/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"
import requests

url = "https://admin.vps.org/api/v1/domains/"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}

response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch('https://admin.vps.org/api/v1/domains/', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  }
});

const domains = await response.json();
console.log(domains);

ឧទាហរណ៍នៃការឆ្លើយតប

{
  "count": 3,
  "results": [
    {
      "id": 101,
      "domain_name": "example.com",
      "status": "active",
      "registration_date": "2023-01-15T10:30:00Z",
      "expiration_date": "2026-01-15T10:30:00Z",
      "auto_renew": true,
      "locked": true,
      "nameservers": [
        "ns1.vps.org",
        "ns2.vps.org"
      ],
      "privacy_protection": true,
      "dns_managed_by": "vps.org"
    },
    {
      "id": 102,
      "domain_name": "myapp.io",
      "status": "active",
      "registration_date": "2024-06-20T14:15:00Z",
      "expiration_date": "2025-06-20T14:15:00Z",
      "auto_renew": false,
      "locked": false,
      "nameservers": [
        "ns1.cloudflare.com",
        "ns2.cloudflare.com"
      ],
      "privacy_protection": false,
      "dns_managed_by": "external"
    }
  ]
}

លេខកូដស្ថានភាពឆ្លើយតប

200 បានទាញយកបញ្ជីដែនដោយជោគជ័យ
401 គ្មានការអនុញ្ញាត - សញ្ញាសម្ងាត់ផ្ទៀងផ្ទាត់មិនត្រឹមត្រូវ ឬបាត់
ផ្ញើ​សារ /api/v1/domains/

ចុះឈ្មោះដែនថ្មី

ចុះឈ្មោះ​ឈ្មោះ​ដែន​ថ្មី & # 160; ។ ដែន​ដែល​មាន​គួរ​តែ​ត្រូវ​បាន​ពិនិត្យ​មុន​ពេល​ចុះឈ្មោះ & # 160; ។

ស្នើសុំប៉ារ៉ាម៉ែត្រតួ

ប៉ារ៉ាម៉ែត្រ ប្រភេទ តម្រូវឲ្យមាន សេចក្ដី​ពិពណ៌នា
domain_name string បាទ/ចាស៎ Domain name to register (e.g., "example.com")
years integer គ្មាន Registration period in years (1-10, default: 1)
auto_renew boolean គ្មាន Enable automatic renewal (default: true)
privacy_protection boolean គ្មាន Enable WHOIS privacy protection (default: true)
nameservers array គ្មាន Custom nameservers (default: VPS.org nameservers)

សំណើឧទាហរណ៍

cURL
Python
JavaScript
PHP
curl -X POST "https://admin.vps.org/api/v1/domains/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "domain_name": "mynewdomain.com",
    "years": 2,
    "auto_renew": true,
    "privacy_protection": true
  }'
import requests

url = "https://admin.vps.org/api/v1/domains/"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}
data = {
    "domain_name": "mynewdomain.com",
    "years": 2,
    "auto_renew": True,
    "privacy_protection": True
}

response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch('https://admin.vps.org/api/v1/domains/', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    domain_name: 'mynewdomain.com',
    years: 2,
    auto_renew: true,
    privacy_protection: true
  })
});

const domain = await response.json();
console.log(domain);
$data = [
    'domain_name' => 'mynewdomain.com',
    'years' => 2,
    'auto_renew' => true,
    'privacy_protection' => true
];

$ch = curl_init('https://admin.vps.org/api/v1/domains/');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer YOUR_API_TOKEN',
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
$domain = json_decode($response, true);
curl_close($ch);

ឧទាហរណ៍នៃការឆ្លើយតប

{
  "id": 103,
  "domain_name": "mynewdomain.com",
  "status": "pending",
  "registration_date": "2026-01-16T16:00:00Z",
  "expiration_date": "2028-01-16T16:00:00Z",
  "auto_renew": true,
  "locked": true,
  "nameservers": [
    "ns1.vps.org",
    "ns2.vps.org"
  ],
  "privacy_protection": true,
  "dns_managed_by": "vps.org",
  "total_cost": 24.98,
  "message": "Domain registration initiated. Processing may take 5-10 minutes."
}

លេខកូដស្ថានភាពឆ្លើយតប

201 Domain registration initiated successfully
400 Bad Request - Invalid domain name or domain already registered
401 គ្មានការអនុញ្ញាត - សញ្ញាសម្ងាត់ផ្ទៀងផ្ទាត់មិនត្រឹមត្រូវ ឬបាត់
402 Payment Required - Insufficient account balance
ចំណាំ & # 160; ៖ Domain registration is not instant. Status will change from pending to active within 5-10 minutes. You'll receive an email confirmation when registration completes.
ទទួលបាន /api/v1/domains/{domain_id}/

យក​សេចក្ដី​លម្អិត​ដែន

យក​ព័ត៌មាន​លម្អិត​អំពី​ដែន​ជាក់លាក់ & # 160; ។

ប៉ារ៉ាម៉ែត្រផ្លូវ

ប៉ារ៉ាម៉ែត្រ ប្រភេទ តម្រូវឲ្យមាន សេចក្ដី​ពិពណ៌នា
domain_id integer បាទ/ចាស៎ Unique domain ID

សំណើឧទាហរណ៍

cURL
Python
JavaScript
curl -X GET "https://admin.vps.org/api/v1/domains/101/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"
import requests

domain_id = 101
url = f"https://admin.vps.org/api/v1/domains/{domain_id}/"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}

response = requests.get(url, headers=headers)
print(response.json())
const domainId = 101;
const response = await fetch(`https://admin.vps.org/api/v1/domains/${domainId}/`, {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  }
});

const domain = await response.json();
console.log(domain);

ឧទាហរណ៍នៃការឆ្លើយតប

{
  "id": 101,
  "domain_name": "example.com",
  "status": "active",
  "registration_date": "2023-01-15T10:30:00Z",
  "expiration_date": "2026-01-15T10:30:00Z",
  "auto_renew": true,
  "locked": true,
  "nameservers": [
    "ns1.vps.org",
    "ns2.vps.org"
  ],
  "privacy_protection": true,
  "dns_managed_by": "vps.org",
  "registrar": "VPS.org",
  "days_until_expiration": 730,
  "whois_info": {
    "registrant": "Privacy Protected",
    "admin_contact": "Privacy Protected",
    "tech_contact": "Privacy Protected",
    "created_date": "2023-01-15",
    "updated_date": "2025-12-20"
  },
  "dns_records_count": 12
}

លេខកូដស្ថានភាពឆ្លើយតប

200 Successfully retrieved domain details
401 គ្មានការអនុញ្ញាត - សញ្ញាសម្ងាត់ផ្ទៀងផ្ទាត់មិនត្រឹមត្រូវ ឬបាត់
404 រកមិនឃើញ - ដែនមិនមានទេ
ដាក់ /api/v1/domains/{domain_id}/

ធ្វើ​ឲ្យ​ការ​កំណត់​ដែន​ទាន់សម័យ

ធ្វើ​ឲ្យ​ការ​កំណត់​រចនាសម្ព័ន្ធ​ដែន​ទាន់សម័យ​ដូចជា​ការ​ធ្វើ​ឲ្យ​ទាន់សម័យ​ដោយ​ស្វ័យប្រវត្តិ ម៉ាស៊ីន​បម្រើ​ឈ្មោះ និង​ការ​កំណត់​ភាព​ឯកជន & # 160; ។

ប៉ារ៉ាម៉ែត្រផ្លូវ

ប៉ារ៉ាម៉ែត្រ ប្រភេទ តម្រូវឲ្យមាន សេចក្ដី​ពិពណ៌នា
domain_id integer បាទ/ចាស៎ Unique domain ID

ស្នើសុំប៉ារ៉ាម៉ែត្រតួ

ប៉ារ៉ាម៉ែត្រ ប្រភេទ តម្រូវឲ្យមាន សេចក្ដី​ពិពណ៌នា
auto_renew boolean គ្មាន Enable or disable automatic renewal
privacy_protection boolean គ្មាន Enable or disable WHOIS privacy
nameservers array គ្មាន Update nameservers (2-4 nameservers required)
locked boolean គ្មាន Lock or unlock domain to prevent transfers

សំណើឧទាហរណ៍

cURL
Python
JavaScript
curl -X PUT "https://admin.vps.org/api/v1/domains/101/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "auto_renew": false,
    "nameservers": [
      "ns1.cloudflare.com",
      "ns2.cloudflare.com"
    ]
  }'
import requests

domain_id = 101
url = f"https://admin.vps.org/api/v1/domains/{domain_id}/"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}
data = {
    "auto_renew": False,
    "nameservers": [
        "ns1.cloudflare.com",
        "ns2.cloudflare.com"
    ]
}

response = requests.put(url, headers=headers, json=data)
print(response.json())
const domainId = 101;
const response = await fetch(`https://admin.vps.org/api/v1/domains/${domainId}/`, {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    auto_renew: false,
    nameservers: [
      'ns1.cloudflare.com',
      'ns2.cloudflare.com'
    ]
  })
});

const domain = await response.json();
console.log(domain);

ឧទាហរណ៍នៃការឆ្លើយតប

{
  "id": 101,
  "domain_name": "example.com",
  "status": "active",
  "auto_renew": false,
  "nameservers": [
    "ns1.cloudflare.com",
    "ns2.cloudflare.com"
  ],
  "privacy_protection": true,
  "locked": true,
  "message": "Domain settings updated successfully. Nameserver changes may take up to 24 hours to propagate."
}

លេខកូដស្ថានភាពឆ្លើយតប

200 Domain updated successfully
400 Bad Request - Invalid parameters
401 គ្មានការអនុញ្ញាត - សញ្ញាសម្ងាត់ផ្ទៀងផ្ទាត់មិនត្រឹមត្រូវ ឬបាត់
404 រកមិនឃើញ - ដែនមិនមានទេ
លុប /api/v1/domains/{domain_id}/

លុប​ដែន

លុប​ដែន​ពី​គណនី​របស់​អ្នក & # 160; ។ វា​មិន​បោះបង់​ការ​ចុះឈ្មោះ​ដែន​ទេ - វា​គ្រាន់តែ​យក​វា​ចេញ​ពី​ការ​គ្រប់គ្រង​គណនី VPS.org របស់​អ្នក & # 160; ។

ប៉ារ៉ាម៉ែត្រផ្លូវ

ប៉ារ៉ាម៉ែត្រ ប្រភេទ តម្រូវឲ្យមាន សេចក្ដី​ពិពណ៌នា
domain_id integer បាទ/ចាស៎ Unique domain ID

សំណើឧទាហរណ៍

cURL
Python
JavaScript
curl -X DELETE "https://admin.vps.org/api/v1/domains/101/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"
import requests

domain_id = 101
url = f"https://admin.vps.org/api/v1/domains/{domain_id}/"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}

response = requests.delete(url, headers=headers)
print(response.status_code)
const domainId = 101;
const response = await fetch(`https://admin.vps.org/api/v1/domains/${domainId}/`, {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  }
});

console.log(response.status);

លេខកូដស្ថានភាពឆ្លើយតប

204 Domain removed from account successfully
401 គ្មានការអនុញ្ញាត - សញ្ញាសម្ងាត់ផ្ទៀងផ្ទាត់មិនត្រឹមត្រូវ ឬបាត់
404 រកមិនឃើញ - ដែនមិនមានទេ
Important: Deleting a domain from your VPS.org account does NOT cancel the registration. The domain will continue to be registered and will auto-renew if enabled. To cancel a domain registration, disable auto-renewal and let it expire.
ផ្ញើ​សារ /api/v1/domains/{domain_id}/transfer/

ផ្ទេរ​ដែន

ចាប់ផ្តើមផ្ទេរដែនទៅ VPS.org ពីអ្នកចុះឈ្មោះផ្សេងទៀត។

ប៉ារ៉ាម៉ែត្រផ្លូវ

ប៉ារ៉ាម៉ែត្រ ប្រភេទ តម្រូវឲ្យមាន សេចក្ដី​ពិពណ៌នា
domain_id integer បាទ/ចាស៎ Unique domain ID

ស្នើសុំប៉ារ៉ាម៉ែត្រតួ

ប៉ារ៉ាម៉ែត្រ ប្រភេទ តម្រូវឲ្យមាន សេចក្ដី​ពិពណ៌នា
auth_code string បាទ/ចាស៎ EPP/Authorization code from current registrar
auto_renew boolean គ្មាន Enable auto-renewal after transfer (default: true)

សំណើឧទាហរណ៍

cURL
Python
JavaScript
curl -X POST "https://admin.vps.org/api/v1/domains/101/transfer/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "auth_code": "Xy9Kl2Mn#4pQ",
    "auto_renew": true
  }'
import requests

domain_id = 101
url = f"https://admin.vps.org/api/v1/domains/{domain_id}/transfer/"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}
data = {
    "auth_code": "Xy9Kl2Mn#4pQ",
    "auto_renew": True
}

response = requests.post(url, headers=headers, json=data)
print(response.json())
const domainId = 101;
const response = await fetch(`https://admin.vps.org/api/v1/domains/${domainId}/transfer/`, {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    auth_code: 'Xy9Kl2Mn#4pQ',
    auto_renew: true
  })
});

const transfer = await response.json();
console.log(transfer);

ឧទាហរណ៍នៃការឆ្លើយតប

{
  "id": 101,
  "domain_name": "example.com",
  "transfer_status": "pending",
  "transfer_initiated_at": "2026-01-16T16:30:00Z",
  "estimated_completion": "2026-01-23T16:30:00Z",
  "message": "Domain transfer initiated. You should receive a confirmation email from your current registrar. Transfer typically completes within 5-7 days.",
  "next_steps": [
    "Check email for transfer authorization request",
    "Approve transfer with current registrar",
    "Wait for transfer to complete (5-7 days)",
    "Domain will be automatically renewed for 1 year upon completion"
  ]
}

លេខកូដស្ថានភាពឆ្លើយតប

200 Transfer initiated successfully
400 Bad Request - Invalid auth code or domain not eligible for transfer
401 គ្មានការអនុញ្ញាត - សញ្ញាសម្ងាត់ផ្ទៀងផ្ទាត់មិនត្រឹមត្រូវ ឬបាត់
404 រកមិនឃើញ - ដែនមិនមានទេ
402 Payment Required - Insufficient account balance for transfer fee
តម្រូវការ​ផ្ទេរ & # 160; ៖
  • ដែន​ត្រូវ​តែ​ដោះសោ​នៅ​កន្លែង​ចុះឈ្មោះ​បច្ចុប្បន្ន
  • ដែន​ត្រូវ​តែ​មាន​អាយុ​យ៉ាង​ហោច​ណាស់ ៦០ ថ្ងៃ
  • ត្រូវការ​កូដ EPP/Auth ត្រឹមត្រូវ
  • អ៊ីមែល WHOIS ត្រូវ​តែ​អាច​ចូល​ដំណើរការ​បាន​សម្រាប់​ការ​អនុម័ត
  • ការផ្ទេររួមបញ្ចូលការធ្វើបច្ចុប្បន្នភាព 1 ឆ្នាំ (ថ្លៃសេវាអនុវត្ត)

ការ​កំណត់​តម្លៃ​ដែន

TLDs ពេញនិយម

ដែន​កំពូល ការចុះឈ្មោះ (1 ឆ្នាំ) ធ្វើ​ឲ្យ​ទាន់សម័យ ផ្ទេរ
.com $12.99 $12.99 $12.99
.net $14.99 $14.99 $14.99
.org $13.99 $13.99 $13.99
.io $39.99 $39.99 $39.99
.dev $14.99 $14.99 $14.99
.app $14.99 $14.99 $14.99
.co $24.99 $24.99 $24.99

លក្ខណៈពិសេសដែលរួមបញ្ចូល

  • ✓ ការ​ការពារ​ភាព​ឯកជន​ដោយ​ឥត​គិត​ថ្លៃ WHOIS
  • ✓ ការ​គ្រប់គ្រង DNS ឥតគិតថ្លៃ
  • ✓ ការ​បញ្ជូន​បន្ត​អ៊ីមែល​ដោយ​ឥត​គិត​ថ្លៃ
  • ✓ ដែន​ឥតគិតថ្លៃ​បញ្ជូន​បន្ត
  • ✓ ចាក់សោ​ដែន​ឥតគិតថ្លៃ
  • ✓ 24/7 ការគាំទ្រ
  • ✓ ការ​គ្រប់គ្រង​ដែន​ងាយស្រួល
  • ✓ ជម្រើស​ធ្វើ​ឲ្យ​ទាន់សម័យ​ដោយ​ស្វ័យប្រវត្តិ

ការ​អនុវត្ត​ល្អបំផុត​សម្រាប់​ការ​គ្រប់គ្រង​ដែន

សុវត្ថិភាព

ការ​កំណត់​រចនាសម្ព័ន្ធ​

ការ​ផ្ទេរ