API Domain

Thông tin chung về API

Endpoint:
https://portal.trungtamdev.com/api/v19/domain

Phương thức HTTP:
POST

Content-Type:
application/x-www-form-urlencoded

Định dạng phản hồi:
JSON

Xác thực Authorization:
Authorization: Bearer {auth_token}
auth_token={token}
Lấy auth_token tại trang profile

🔒 Cảnh báo bảo mật
  • auth_token là chìa khóa truy cập tài khoản - vui lòng bảo mật tuyệt đối
  • Không chia sẻ auth_token với bất kỳ ai, kể cả nhân viên hỗ trợ
  • Thay đổi auth_token thường xuyên để tăng cường bảo mật
  • Nếu nghi ngờ bị lộ, hãy thay đổi ngay lập tức
  • Thông tin VPS và tài khoản chỉ hiển thị cho chủ tài khoản

Actions hỗ trợ: services, buy, renew, changens

  • action=services: danh sách đuôi tên miền và giá
  • action=buy: tham số domainName, nameServer1, nameServer2, coupon (tuỳ chọn)
  • action=renew: tham số orderId, domainId, coupon (tuỳ chọn)
  • action=changens: tham số orderId, ns1, ns2

JSON mẫu

Request (services)
{"auth_token":"YOUR_TOKEN","action":"services"}
Request (buy)
{
  "auth_token":"YOUR_TOKEN",
  "action":"buy",
  "domainName":"example.vn",
  "nameServer1":"ns1.example.vn",
  "nameServer2":"ns2.example.vn",
  "coupon":"DOMAIN10"
}
Request (renew)
{
  "auth_token":"YOUR_TOKEN",
  "action":"renew",
  "orderId": 88,
  "domainId": 3,
  "coupon":"RENEW5"
}
Request (changens)
{
  "auth_token":"YOUR_TOKEN",
  "action":"changens",
  "orderId": 88,
  "ns1":"ns1.newdns.com",
  "ns2":"ns2.newdns.com"
}
Response (changens success)
{
  "status":"success",
  "message":"Đã cập nhật nameserver thành công",
  "data":{"domain":"example.vn","ns1":"ns1.newdns.com","ns2":"ns2.newdns.com"}
}
← Quay lại danh mục