apiDevelopers

One place for every HostiGuard API

Read prices, check and register domains, order dedicated servers, send SMS and connect WHMCS or WordPress — every integration is documented here, with the downloads at the bottom.

Base URL https://hostiguard.com/api/v1

Overview

HostiGuard exposes a small, predictable JSON API. All requests go over HTTPS, keys are sent as Bearer tokens, and every answer carries a success flag. Pick the integration you need:

Authentication

Create a key in Dashboard → Business → API. Send it with every request in the Authorization header. The key is shown once when it is created; store it securely and never use it in browser-side code.

Authorization: Bearer hg_live_4cf37e433aaf7c69fed5c47ce11bdb870753bb9a

Each key has scopes. A request to an endpoint whose scope the key does not have returns 403.

lockaccount lockdomains lockservers lockclients

Reseller keys & test mode

An active reseller (Dashboard → Reseller → API) gets two keys on this same API. Reseller keys have the account, domains and servers scopes; the sub-client endpoints are for Business accounts only. Prices returned to a reseller key are already at the reseller rate — the public price is given alongside as "retail".

hg_live_…

Live key — real prices at your reseller rate and real orders paid from your wallet balance.

hg_test_…

Test key — identical reads, but every order is simulated: the request is validated and priced, nothing is created and nothing is charged. Use it to build and test your integration safely.

Every response from a reseller key carries "mode" ("live" or "test"). A simulated order answers 200 (not 201) with "simulated": true and tells you whether the same call would succeed with your live key:

{
    "success": true,
    "data": {
        "mode": "test",
        "simulated": true,
        "service_type": 3,
        "retail": 12.99,
        "discount": 2.6,
        "reseller_discount": 20,
        "amount": 10.39,
        "currency": "USD",
        "balance": 250
    }
}

Keys are shown once when created; regenerating a key revokes the previous one immediately. Keep the live key on your server only — never in browser-side code.

keyGet your reseller keys

Response format

Every response has a "success" flag. Successful calls return the result in "data"; failed calls return an "error" object with a machine-readable "code" and a human-readable "message".

{
    "success": true,
    "data": {
        "…": "…"
    }
}
{
    "success": false,
    "error": {
        "code": "insufficient_balance",
        "message": "Insufficient wallet balance.",
        "required": 169.99,
        "balance": 65.06
    }
}

Error codes

401 Missing, invalid or revoked key
402 Wallet balance is lower than the order total ("required" and "balance" are included)
403 Business account not active, or the key lacks the scope
404 Resource not found (order, sub-client, extension)
405 Wrong HTTP method
422 Invalid or missing parameter

Payments

account_balance_wallet

Orders placed through the API are paid immediately from the wallet balance of the account. If the balance is not sufficient the order is not created and the API returns 402. Add funds from Dashboard → Balance. All payments are final — see the Refund Policy. Refund Policy

Business / Reseller API v1 — endpoints

Business keys use the scopes of the key; reseller keys (live / test) can use the account, domains and servers endpoints at the reseller price. Every endpoint is listed below with parameters, a cURL example and the response.

GET /account lockScope: account

Account

Returns the account, company, wallet balance and the scopes of the key in use.

Example

curl https://hostiguard.com/api/v1/account -H "Authorization: Bearer hg_live_…"

Response

{
    "success": true,
    "data": {
        "account_id": 1024,
        "name": "Alpha Web Agency",
        "company": "Alpha Web Agency",
        "account_type": "company",
        "balance": 250,
        "currency": "USD",
        "min_balance": 100,
        "key": {
            "name": "My website",
            "prefix": "hg_live_4cf37e43",
            "scopes": [
                "account",
                "domains"
            ]
        }
    }
}
GET /domains/pricing lockScope: domains

Domain pricing

Price list of all extensions (registration, renewal, transfer, restore — per year). Filter one extension with tld.

Parameters

tld optional extension without the dot, e.g. com

Example

curl "https://hostiguard.com/api/v1/domains/pricing?tld=com" -H "Authorization: Bearer hg_live_…"

Response

{
    "success": true,
    "data": {
        "count": 1,
        "items": [
            {
                "tld": ".com",
                "registration": 14.95,
                "renewal": 14.89,
                "transfer": 14.59,
                "restore": 103.9,
                "currency": "USD",
                "per": "year",
                "popular": true
            }
        ]
    }
}
GET /domains/check lockScope: domains

Check a domain

Availability of a domain name with its price. "available" is true, false, or null when the registry could not be reached (retry later).

Parameters

domain required full domain name, e.g. mysite.com

Example

curl "https://hostiguard.com/api/v1/domains/check?domain=mysite.com" -H "Authorization: Bearer hg_live_…"

Response

{
    "success": true,
    "data": {
        "domain": "mysite.com",
        "available": true,
        "status": "available",
        "price": {
            "registration": 14.95,
            "renewal": 14.89,
            "currency": "USD",
            "per": "year"
        }
    }
}
GET /domains lockScope: domains

List domains

All domain names of the account with status, expiry date and the sub-client they are assigned to.

Example

curl https://hostiguard.com/api/v1/domains -H "Authorization: Bearer hg_live_…"

Response

{
    "success": true,
    "data": {
        "count": 1,
        "items": [
            {
                "domain_id": 46,
                "domain": "mysite.com",
                "status": "active",
                "auto_renew": true,
                "registered": "2026-09-22 00:00:00",
                "expires": "2027-09-21 00:00:00",
                "client_id": 12
            }
        ]
    }
}
POST /domains/register lockScope: domains

Register a domain

Registers the domain for the given number of years and pays it from the wallet. Optionally assigns it to a sub-client.

Parameters

domain required full domain name, e.g. mysite.com
years optional registration period in years, 1–10 (default 1)
privacy optional true to enable WHOIS privacy where the extension allows it
nameservers optional list of nameservers to set after registration
client_id optional id of the sub-client to assign the service to

Example

curl -X POST https://hostiguard.com/api/v1/domains/register \
  -H "Authorization: Bearer hg_live_…" \
  -H "Content-Type: application/json" \
  -d '{"domain":"mysite.com","years":1,"privacy":true,"client_id":12}'

Response

{
    "success": true,
    "data": {
        "payment_id": 114,
        "order_id": 158,
        "invoice_id": 181,
        "invoice_number": "INV-2026-0072",
        "service_id": 46,
        "service_type": 3,
        "status": 1,
        "client_id": 12,
        "amount": 14.95,
        "currency": "USD",
        "balance": 235.05
    }
}
GET /servers/plans lockScope: servers

Dedicated server plans

Available dedicated-server plans with their features and prices per billing cycle.

Example

curl https://hostiguard.com/api/v1/servers/plans -H "Authorization: Bearer hg_live_…"

Response

{
    "success": true,
    "data": {
        "count": 3,
        "items": [
            {
                "plan_id": 2,
                "name": "Performance Dedicated",
                "slug": "performance-dedicated",
                "description": "High-traffic applications",
                "features": [
                    {
                        "text": "16-Core CPU (E5-2680)",
                        "type": "check"
                    }
                ],
                "pricing": {
                    "monthly": {
                        "price": 169.99,
                        "setup_fee": 0
                    },
                    "yearly": {
                        "price": 1799.88,
                        "setup_fee": 0
                    }
                },
                "currency": "USD"
            }
        ]
    }
}
GET /servers lockScope: servers

List servers

All dedicated servers of the account with status, IP, dates and assigned sub-client.

Example

curl https://hostiguard.com/api/v1/servers -H "Authorization: Bearer hg_live_…"

Response

{
    "success": true,
    "data": {
        "count": 1,
        "items": [
            {
                "server_id": 1,
                "plan_id": 2,
                "plan": "Performance Dedicated",
                "hostname": "srv1.example.com",
                "ip_address": "203.0.113.10",
                "status": "active",
                "billing_cycle": "monthly",
                "date_start": "2026-09-22",
                "date_expires": "2026-10-21",
                "client_id": 12
            }
        ]
    }
}
POST /servers/order lockScope: servers

Order a dedicated server

Orders a plan for the given billing cycle and pays it from the wallet. The server is then provisioned like a website order.

Parameters

plan_id required plan_id from /servers/plans
billing_cycle required monthly, quarterly, semiannual or yearly (only cycles listed in the plan pricing)
hostname optional hostname for the server
client_id optional id of the sub-client to assign the service to

Example

curl -X POST https://hostiguard.com/api/v1/servers/order \
  -H "Authorization: Bearer hg_live_…" \
  -H "Content-Type: application/json" \
  -d '{"plan_id":2,"billing_cycle":"monthly","hostname":"srv1.example.com","client_id":12}'

Response

{
    "success": true,
    "data": {
        "payment_id": 115,
        "order_id": 159,
        "invoice_id": 182,
        "invoice_number": "INV-2026-0073",
        "service_id": 1,
        "service_type": 5,
        "status": 1,
        "client_id": 12,
        "amount": 169.99,
        "currency": "USD",
        "balance": 65.06
    }
}
GET /orders/{id} lockScope: account

Order details

Status, items and invoices of one order.

Example

curl https://hostiguard.com/api/v1/orders/158 -H "Authorization: Bearer hg_live_…"

Response

{
    "success": true,
    "data": {
        "order_id": 158,
        "status": "complete",
        "total": 89.99,
        "currency": "USD",
        "created_at": "2026-09-22 04:00:19",
        "items": [
            {
                "item_id": 211,
                "service_type": "dedicated",
                "service_id": 1,
                "price": 89.99,
                "setup_fee": 0,
                "next_due": "2026-10-21",
                "status": 1
            }
        ],
        "invoices": [
            {
                "invoice_id": 181,
                "number": "INV-2026-0072",
                "total": 89.99,
                "status": 1,
                "date_paid": "2026-09-22 04:00:19"
            }
        ]
    }
}
GET /clients lockScope: clients

List sub-clients

Sub-clients of the account with the number of services assigned to each.

Example

curl https://hostiguard.com/api/v1/clients -H "Authorization: Bearer hg_live_…"

Response

{
    "success": true,
    "data": {
        "count": 1,
        "items": [
            {
                "client_id": 12,
                "account_id": 201,
                "full_name": "Mohammed Al-Rashid",
                "company": "Rashid Trading LLC",
                "email": "mohammed@example.com",
                "phone": "+971500000001",
                "status": "active",
                "services": 3,
                "created_at": "2026-09-22 03:58:15"
            }
        ]
    }
}
POST /clients lockScope: clients

Create a sub-client

Creates a sub-client with their own HostiGuard login; the password is e-mailed to the given address. Use its client_id when ordering.

Parameters

full_name required name of the person or company
company optional company name
email required e-mail address
phone optional phone number
notes optional internal notes

Example

curl -X POST https://hostiguard.com/api/v1/clients \
  -H "Authorization: Bearer hg_live_…" \
  -H "Content-Type: application/json" \
  -d '{"full_name":"Ibrahim Saleh","email":"ibrahim@example.com"}'

Response

{
    "success": true,
    "data": {
        "client_id": 13,
        "account_id": 205,
        "full_name": "Ibrahim Saleh",
        "company": null,
        "email": "ibrahim@example.com",
        "phone": null,
        "status": "active",
        "services": 0,
        "created_at": "2026-09-22 04:00:02"
    }
}

SMS API

Send text messages programmatically from an active SMS service. Each message is deducted from the bundle volume of the service linked to the key.

Create a key in Dashboard → SMS → API keys and send it in the Authorization header. If a secret was set for the key, send it in the body as api_secret.

Authorization: Bearer sk_your_sms_key
POST https://hostiguard.com/api/sms/send

Parameters

torequiredDestination number in international format (+1234567890).
messagerequiredText of the message.
api_secretoptionalRequired only when the key has a secret.

Example

curl -X POST https://hostiguard.com/api/sms/send \
  -H "Authorization: Bearer sk_your_sms_key" \
  -H "Content-Type: application/json" \
  -d '{"to":"+1234567890","message":"Hello from HostiGuard!","api_secret":"your_secret"}'

Response

{
    "success": true,
    "message": "SMS sent successfully.",
    "data": {
        "to": "+1234567890",
        "message_id": "msg_8f7b0d2c91aa41c3"
    }
}

Error codes

401Missing / invalid key, or wrong api_secret
400Missing "to" or "message"
402No SMS volume left in the bundle
403The SMS service is inactive or suspended

Keys and secrets are managed in Dashboard → SMS

Payment webhooks (incoming)

These are the URLs HostiGuard listens on. Paste the right one in each gateway's dashboard so payments are confirmed and invoices marked paid without any manual step. Signatures are verified with the secret saved in Admin → Settings → Payments & APIs.

GatewayWebhook URLEvents handled
Stripe POST https://hostiguard.com/api/webhooks/stripe checkout.session.completed · payment_intent.payment_failed · charge.refunded
PayPal POST https://hostiguard.com/api/webhooks/paypal CHECKOUT.ORDER.APPROVED · PAYMENT.CAPTURE.COMPLETED · PAYMENT.CAPTURE.DENIED / DECLINED
Paddle POST https://hostiguard.com/api/webhooks/paddle transaction.completed · transaction.paid
Airwallex POST https://hostiguard.com/api/webhooks/airwallex payment_intent.succeeded · payment_intent.requires_capture · payment_intent.captured
Amazon Pay POST https://hostiguard.com/api/webhooks/amazonpay Checkout session / charge notifications (checkoutSessionId or chargeId)
Network (N-Genius) POST / GET https://hostiguard.com/api/webhooks/network TRANSACTION_STATE_CHANGED (state CAPTURED / AUTHORISED)
XaPay (crypto) POST https://hostiguard.com/api/webhooks/xapay status "paid" / event "invoice.paid"

A webhook is acknowledged with HTTP 200 even when the event is ignored; failed signature checks return 400/401 and are logged.

WHMCS modules

v1.0.0 · WHMCS 7.10+ / 8.x

Two modules in one archive: a domain registrar module and a dedicated-server provisioning module. Both talk to API v1 with your Business or Reseller key; orders are paid from your HostiGuard wallet at your reseller price.

What it does

  • check_circleDomain availability search per TLD and TLD price import into WHMCS.
  • check_circleDomain registration with period, ID protection and nameservers; information and expiry sync.
  • check_circleDedicated-server products: plan list loaded live, order on "Create", HostiGuard ids stored on the service.
  • check_circleClient area and admin tab show hostname, IP, status and expiry straight from HostiGuard.
  • check_circleA reseller test key (hg_test_…) simulates every order — ideal for a staging WHMCS.

Installation

  1. Download the archive below and unzip it in the root of your WHMCS (it adds modules/registrars/hostiguard and modules/servers/hostiguardservers).
  2. Setup → Products/Services → Domain Registrars → HostiGuard → Activate; enter your HostiGuard URL and API key.
  3. Optional: Setup → Domain Pricing → Import TLD pricing to pull the prices from HostiGuard.
  4. Setup → Servers → Add New Server: module HostiGuard Dedicated Servers, hostname = your HostiGuard URL, SSL on, access hash = API key; create a server group.
  5. Product → Module Settings: choose the HostiGuard plan and billing cycle. Logs: Utilities → Logs → Module Log.
Good to know: renewals, transfers, nameserver changes, EPP codes and suspend / terminate are not exposed by API v1 yet — those actions are done from the HostiGuard dashboard and the modules say so instead of failing silently.
extension

WHMCS modules (registrar + dedicated servers)

hostiguard-whmcs-modules-1.0.0.zip · 15 KB · 6 files · v1.0.0

downloadDownload

WordPress plugin — HostiGuard Connector

v1.0.0 · WordPress 5.8+ · PHP 7.4+

Sell HostiGuard domains and dedicated servers from your own WordPress site. Works without WooCommerce (visitors are sent to HostiGuard to finish the order) or with WooCommerce (you get paid in your shop, the plugin provisions at HostiGuard after payment).

What it does

  • check_circle[hostiguard_domain_search] — live availability and price, with alternative extensions.
  • check_circle[hostiguard_domain_pricing] and [hostiguard_server_plans] — tables and cards fed by the API, cached.
  • check_circleWooCommerce: a domain is added to the cart at the live price; after payment it is registered through your key.
  • check_circleMap any WooCommerce product to a HostiGuard server plan (Product data → HostiGuard tab); it is ordered when paid.
  • check_circleResults and errors in the order notes, retry from Order actions, settings page shows connection and balance.

Installation

  1. Download the zip below; WordPress → Plugins → Add New → Upload Plugin → Activate.
  2. Settings → HostiGuard: enter your HostiGuard URL and API key. The page confirms the connection and shows your balance and key mode.
  3. Put [hostiguard_domain_search] (and the other shortcodes) on any page.
  4. WooCommerce (optional): create a simple product "Domain registration", select it in the settings and switch Register to the WooCommerce mode.
  5. To sell servers: edit a product → Product data → HostiGuard → choose the plan and cycle.

Shortcodes

[hostiguard_domain_search]Domain search with live price. Attributes: tlds="com,net,org", placeholder, button.
[hostiguard_domain_pricing]Price table per extension. Attributes: tlds to limit, columns="registration,renewal,transfer".
[hostiguard_server_plans]Dedicated-server plan cards. Attributes: cycle, button, link.
Good to know: the plugin provisions at HostiGuard only after the order is paid; keep your wallet balance above the orders you expect. Renewals are invoiced on your HostiGuard account at expiry.

Downloads

Both packages are built from the exact code shipped with this version of HostiGuard, so they always match the API documented above.

extension

WHMCS modules (registrar + dedicated servers)

hostiguard-whmcs-modules-1.0.0.zip · 15 KB · 6 files · v1.0.0

downloadDownload
widgets

WordPress plugin (HostiGuard Connector)

hostiguard-connector-1.0.0.zip · 20 KB · 9 files · v1.0.0

downloadDownload
Versioning: the modules follow the API. Whenever an endpoint changes or a new one is added, the WHMCS modules and the WordPress plugin are updated and re-published here with a new version number — re-download them after an API update.

Changelog

  • new_releasesv1.0.0 — first release of the unified documentation, the WHMCS registrar + provisioning modules and the WordPress Connector plugin (API v1).

Your next chapter starts here.

Power your business with hosting built to grow.