Official Developer REST API v1.0

HostAsia Cloud & Domains API

Automate domain searches, registration, live DNS zone record edits, nameserver switching, and NVMe hosting provisioning with sub-second API latency. All requests route directly through HostAsia's Tier-4 infrastructure.

150+ Top-Level Domains
Instant DNS Zone Sync
SHA-256 Bearer Auth
Tier-4 India & SG Datacenters
Getting Started

API Overview & Architecture

The HostAsia Platform API is organized around RESTful principles. All request and response bodies use JSON payloads with standard HTTP response status codes. Every action—including instant domain provisioning, live DNS zone record sync, nameserver updates, and server controls—is executed directly through HostAsia's authoritative network.

HostAsia Gateway & Zero Downtime Routing

All domain registrations, WHOIS queries, and DNS zone modifications pass directly through HostAsia. When updating DNS records via the API, changes are applied to the dns1.securedns93.com and dns2.securedns93.com authoritative nameservers with zero downtime and instant propagation.

Production Base URL:
https://newbackend.hostasia.in/api/v1
Security & Tokens

Authentication

Authenticate your API requests by including your secret API key in the request headers. HostAsia supports both the Authorization: Bearer header and the custom X-API-Key header.

Option A: Bearer Authorization HeaderAuthorization: Bearer ha_live_YOUR_KEY

Standard RFC-compliant Bearer token header.

Option B: Custom X-API-Key HeaderX-API-Key: ha_live_YOUR_KEY

Convenient for microservices and curl automation.

Keep Your API Keys Secret

Your API keys carry full access to register domains, modify DNS records, and view invoices. Never commit API keys to public repositories or client-side web browser JavaScript.

How to Setup

Step-by-Step Implementation Guide

Follow these 4 simple steps to connect your custom software, billing systems, or automation bots:

1

Generate Key in User Panel

Log in to your HostAsia Client Dashboard, go to API Credentials, click Generate New Key, give it a label, and copy your secret key (ha_live_...).

2

Add to Environment Variables

Store your key securely in your application environment file:HOSTASIA_API_KEY=ha_live_...

3

Query Domains & Live DNS

Use the endpoints below to list your domains, register new TLDs, and manage live DNS zone records (A, CNAME, MX, TXT).

4

Instant Execution via HostAsia

All changes execute instantly across HostAsia's Tier-4 datacenters and authoritative nameservers without third-party redirects.

Endpoints Reference

Showing 11 endpoints matching your criteria.

POST/domains/check
Public Endpoint

Check Domain Availability

Perform real-time domain availability check against authoritative registries for .in, .co.in, .com, .net, and 150+ TLDs.

Request Payload (JSON)
{
  "domain": "mybrand.in"
}
Code Sample (CURL)
curl -X POST "https://newbackend.hostasia.in/api/v1/domains/check" \
  -H "Content-Type: application/json" \
  -d '{"domain": "mybrand.in"}'
Example Response (200 OK)
{
  "success": true,
  "data": {
    "domain": "mybrand.in",
    "available": true,
    "price": 581,
    "currency": "INR",
    "period": 1,
    "is_premium": false
  },
  "message": "Domain availability status checked."
}
GET/domains
API Key Required

List Account Domains

Retrieve all registered domains, active statuses, registration dates, and next due expiration dates for your HostAsia account.

Code Sample (CURL)
curl -X GET "https://newbackend.hostasia.in/api/v1/domains" \
  -H "Authorization: Bearer ha_live_YOUR_API_KEY"
Example Response (200 OK)
{
  "success": true,
  "data": [
    {
      "id": 1042,
      "domain_name": "hostasia.co.in",
      "status": "Active",
      "registration_date": "2026-01-15",
      "expiry_date": "2027-01-15",
      "auto_renew": true,
      "nameservers": [
        "dns1.securedns93.com",
        "dns2.securedns93.com"
      ]
    }
  ],
  "message": "Retrieved 1 domains."
}
POST/domains/register
API Key Required

Register New Domain

Direct registry provisioning for a domain with contact information, term years, and optional WHOIS ID privacy.

Request Payload (JSON)
{
  "domain": "cloudscale.in",
  "years": 1,
  "dns_management": true,
  "email_forwarding": true,
  "id_protection": true,
  "nameservers": [
    "dns1.securedns93.com",
    "dns2.securedns93.com"
  ],
  "payment_method": "wallet"
}
Code Sample (CURL)
curl -X POST "https://newbackend.hostasia.in/api/v1/domains/register" \
  -H "Authorization: Bearer ha_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "cloudscale.in",
    "years": 1,
    "dns_management": true,
    "id_protection": true,
    "payment_method": "wallet"
  }'
Example Response (200 OK)
{
  "success": true,
  "data": {
    "order_id": 8904,
    "domain": "cloudscale.in",
    "status": "Pending",
    "invoice_id": 4521,
    "message": "Domain order initiated. Instant registry provisioning active."
  },
  "message": "Domain registration initiated successfully."
}
PUT/domains/{domain_id}/nameservers
API Key Required

Update Domain Nameservers

Update primary and secondary authoritative nameservers for any registered domain.

Request Payload (JSON)
{
  "ns1": "ns1.hostasia.in",
  "ns2": "ns2.hostasia.in",
  "ns3": "ns3.hostasia.in",
  "ns4": null
}
Code Sample (CURL)
curl -X PUT "https://newbackend.hostasia.in/api/v1/domains/1042/nameservers" \
  -H "Authorization: Bearer ha_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ns1": "ns1.hostasia.in",
    "ns2": "ns2.hostasia.in"
  }'
Example Response (200 OK)
{
  "success": true,
  "data": null,
  "message": "Nameservers updated successfully."
}
POST/domains/{domain_id}/dns/point
API Key Required

1-Click Point to HostAsia DNS Cluster

Instantly provisions a cPanel DNS zone and points domain nameservers to dns1.securedns93.com and dns2.securedns93.com.

Code Sample (CURL)
curl -X POST "https://newbackend.hostasia.in/api/v1/domains/1042/dns/point" \
  -H "Authorization: Bearer ha_live_YOUR_API_KEY"
Example Response (200 OK)
{
  "success": true,
  "data": {
    "nameservers": [
      "dns1.securedns93.com",
      "dns2.securedns93.com"
    ],
    "zone_created": true
  },
  "message": "cPanel DNS account created & nameservers pointed to dns1.securedns93.com and dns2.securedns93.com."
}
GET/domains/{domain_id}/dns
API Key Required

List Zone DNS Records

Retrieve all active DNS records in the authoritative zone, including A, AAAA, CNAME, MX, TXT, and SRV records with their line index.

Code Sample (CURL)
curl -X GET "https://newbackend.hostasia.in/api/v1/domains/1042/dns" \
  -H "Authorization: Bearer ha_live_YOUR_API_KEY"
Example Response (200 OK)
{
  "success": true,
  "data": {
    "domain": "hostasia.co.in",
    "nameservers": [
      "dns1.securedns93.com",
      "dns2.securedns93.com"
    ],
    "records": [
      {
        "line": 12,
        "name": "hostasia.co.in.",
        "type": "A",
        "content": "148.113.26.234",
        "ttl": 14400
      },
      {
        "line": 14,
        "name": "www.hostasia.co.in.",
        "type": "CNAME",
        "content": "hostasia.co.in.",
        "ttl": 14400
      },
      {
        "line": 18,
        "name": "hostasia.co.in.",
        "type": "MX",
        "content": "mail.hostasia.co.in.",
        "priority": 10,
        "ttl": 14400
      }
    ]
  },
  "message": "DNS zone records retrieved for hostasia.co.in."
}
POST/domains/{domain_id}/dns/records
API Key Required

Add DNS Record

Add a new DNS record to the live zone. Supports A, AAAA, CNAME, MX, TXT, and SRV records with automated syntax validation.

Request Payload (JSON)
{
  "type": "A",
  "name": "api",
  "content": "148.113.26.234",
  "ttl": 14400,
  "priority": 0
}
Code Sample (CURL)
curl -X POST "https://newbackend.hostasia.in/api/v1/domains/1042/dns/records" \
  -H "Authorization: Bearer ha_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "A",
    "name": "api",
    "content": "148.113.26.234",
    "ttl": 14400
  }'
Example Response (200 OK)
{
  "success": true,
  "data": {
    "line": 22,
    "type": "A",
    "name": "api.hostasia.co.in.",
    "content": "148.113.26.234",
    "ttl": 14400
  },
  "message": "DNS record added successfully."
}
DELETE/domains/{domain_id}/dns/records/{line}
API Key Required

Delete DNS Record

Delete an existing DNS record by its zone line index number.

Code Sample (CURL)
curl -X DELETE "https://newbackend.hostasia.in/api/v1/domains/1042/dns/records/22" \
  -H "Authorization: Bearer ha_live_YOUR_API_KEY"
Example Response (200 OK)
{
  "success": true,
  "data": null,
  "message": "DNS record at line 22 deleted successfully."
}
GET/domains/whois?domain={domain}
Public Endpoint

WHOIS / RDAP Lookup

Query public registration data, registrar info, and expiration dates for any registered domain.

Code Sample (CURL)
curl -X GET "https://newbackend.hostasia.in/api/v1/domains/whois?domain=hostasia.co.in"
Example Response (200 OK)
{
  "success": true,
  "data": {
    "domain": "hostasia.co.in",
    "registrar": "HostAsia Cloud Technologies",
    "creation_date": "2026-01-15T00:00:00Z",
    "expiry_date": "2027-01-15T00:00:00Z",
    "nameservers": [
      "dns1.securedns93.com",
      "dns2.securedns93.com"
    ],
    "status": [
      "clientTransferProhibited"
    ]
  },
  "message": "WHOIS lookup completed."
}
GET/domains/{domain_id}/epp-code
API Key Required

Get EPP Transfer Auth Code

Retrieve the authorization EPP secret key for initiating an outbound domain transfer.

Code Sample (CURL)
curl -X GET "https://newbackend.hostasia.in/api/v1/domains/1042/epp-code" \
  -H "Authorization: Bearer ha_live_YOUR_API_KEY"
Example Response (200 OK)
{
  "success": true,
  "data": {
    "epp_code": "ha_EPP_9xL82#pQ"
  },
  "message": "EPP transfer authorization code retrieved."
}
GET/hosting
API Key Required

List Cloud & Hosting Services

Retrieve all active cPanel web hosting accounts, Cloud VPS servers, and dedicated bare-metal instances on your account.

Code Sample (CURL)
curl -X GET "https://newbackend.hostasia.in/api/v1/hosting" \
  -H "Authorization: Bearer ha_live_YOUR_API_KEY"
Example Response (200 OK)
{
  "success": true,
  "data": [
    {
      "id": 204,
      "package_name": "HostAsia Turbo NVMe VPS",
      "domain": "vps1.mycloud.in",
      "ip_address": "148.113.26.234",
      "status": "Active",
      "billing_cycle": "Annually",
      "first_payment_amount": 1499
    }
  ],
  "message": "Retrieved 1 services."
}

Ready to Build With HostAsia?

Generate your API credentials in seconds from your HostAsia user panel and integrate automated domains and live DNS records into your own applications.

Generate API Key Now