API Documentation

Complete reference for DNS Subdomain API endpoints

Overview

Base URL

https://hhhwtf.dev/v1/api

Authentication

All authenticated endpoints require an API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Authentication

All API requests require authentication using an API key (for protected endpoints). Include your API key in the request header.

Request Header
Authorization: Bearer YOUR_API_KEY

Keep your API keys secure. Never commit them to version control or expose them in client-side code.

API Endpoints

POST /domains/search
Try on Swagger

Search Domain Availability

Check if a specific subdomain is available.

Parameters

name required The subdomain name you want to check (e.g. myapp)
domain required Root domain to check against (e.g. hhhwtf.dev)

Request Body

JSON
{
  "name": "myapp",
  "domain": "hhhwtf.dev"
}

Example cURL

cURL
curl -X POST https://hhhwtf.dev/v1/api/domains/search \
  -H "Content-Type: application/json" \
  -d '{
    "name": "myapp",
    "domain": "hhhwtf.dev"
  }'

Responses

Success (200) - Available

{
  "ok": true,
  "message": "subdomain available",
  "domain": "myapp.hhhwtf.dev"
}

Not Available (404)

{
  "ok": false,
  "message": "subdomain not available",
  "domain": "myapp.hhhwtf.dev"
}
POST /domains/search/bulk
Try on Swagger

Search Domain Bulk

Check subdomain availability across all active main domains at once.

Parameters

name required The subdomain name to check across all root domains

Response Status Values

available Subdomain is free to register
not-available Already registered by another user
not-allowed Reserved name (e.g. admin, root, api, mail)

Request Body

{
  "name": "myapp"
}

Success (200)

{
  "ok": true,
  "name": "myapp",
  "results": [
    {
      "fullDomain": "myapp.hhhwtf.dev",
      "domain": "hhhwtf.dev",
      "status": "available"
    },
    {
      "fullDomain": "myapp.yy.zz",
      "domain": "yy.zz",
      "status": "not-available"
    },
    {
      "fullDomain": "myapp.aa.bb",
      "domain": "aa.bb",
      "status": "not-allowed"
    }
  ]
}
POST /domains/buy
Try on Swagger

Buy Domain

Purchase a subdomain with a specific plan. Supports single or bulk purchase.

Headers

Authorization: Bearer YOUR_API_KEY

Parameters

name required Subdomain name to purchase
domain required Root domain (e.g. hhhwtf.dev)
plan required Subscription plan: YEARLY ($3/year) or LIFETIME ($15 one-time)
couponCode optional Discount coupon code
bulkDomains optional Array of { name, domain, plan } objects for bulk purchase. When provided, single fields are ignored.

Request Body

{
  "name": "myapp",
  "domain": "hhhwtf.dev",
  "plan": "YEARLY"
}

Success (200)

{
  "ok": true,
  "message": "Subdomain purchased successfully",
  "data": {
    "subdomainId": "cm5x8y9z...",
    "name": "myapp",
    "domain": "hhhwtf.dev",
    "plan": "YEARLY",
    "expiresAt": "2026-01-15T10:30:00.000Z",
    "orderId": "cm5x8y9z...",
    "walletBalance": "97.00"
  }
}

Insufficient Balance (402)

{
  "ok": false,
  "message": "Insufficient balance",
  "errors": ["Insufficient balance"],
  "noBalance": "No Balance",
  "required": "3",
  "balance": "1.50"
}
POST /domains/delete/:id
Try on Swagger

Delete Domain

Permanently delete a subdomain.

Headers

Authorization: Bearer YOUR_API_KEY

URL Parameter

id required Subdomain ID

Success (200)

{
  "ok": true,
  "message": "Domain deleted successfully",
  "data": {
    "id": "cm5x8y9z...",
    "name": "myapp",
    "domain": "hhhwtf.dev"
  }
}

Not Found (404)

{
  "ok": false,
  "message": "Domain not found",
  "errors": ["Domain not found"]
}
POST /domains/dns/:id
Try on Swagger

Update DNS Records

Replace all DNS records for a subdomain. Previous records are removed and replaced with the new set.

Headers

Authorization: Bearer YOUR_API_KEY

URL Parameter

id required Subdomain ID

Parameters

records required Array of DNS record objects
type required Record type: A, CNAME, TXT, or MX
name required Record name (e.g. @ for root, www for subdomain)
value required Record value (IP address for A, hostname for CNAME/MX, text for TXT)
ttl optional Time to live in seconds. Default: 3600
autoPay optional Enable automatic renewal payment. true or false

Request Body

{
  "records": [
    {
      "type": "A",
      "name": "@",
      "value": "192.168.1.1",
      "ttl": 3600
    },
    {
      "type": "CNAME",
      "name": "www",
      "value": "hhhwtf.dev",
      "ttl": 3600
    }
  ],
  "autoPay": true
}

Success (200)

{
  "ok": true,
  "message": "DNS updated successfully",
  "data": {
    "subdomainId": "cm5x8y9z...",
    "autoPay": true,
    "records": [
      {
        "type": "A",
        "name": "@",
        "value": "192.168.1.1",
        "ttl": 3600
      }
    ]
  }
}
POST /domains/toggle/:id
Try on Swagger

Toggle Domain Status

Enable or disable a subdomain (works for all non-expired plans).

Headers

Authorization: Bearer YOUR_API_KEY

URL Parameter

id required Subdomain ID

Behavior

  • If domain is ACTIVE: Sets status to INACTIVE (does not delete DNS records)
  • If domain is INACTIVE: Reactivates it (free of charge, no expiration date change)
  • Works for all plans as long as the subdomain is not expired

Responses

Success - Activated (200)

{
  "ok": true,
  "message": "Sub-Domain Activated Successfully",
  "data": {
    "title": "Domain Activated",
    "message": "Sub-Domain Activated Successfully"
  }
}

Success - Deactivated (200)

{
  "ok": true,
  "message": "Sub-Domain Deactivated Successfully",
  "data": {
    "title": "Domain Deactivated",
    "message": "Sub-Domain Deactivated Successfully"
  }
}