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.
https://hostiguard.com/api/v1
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:
Account, domain pricing & availability, registration, dedicated-server plans & orders, order lookup, sub-clients.
Send text messages from your own application with the key of an active SMS service.
The callback URLs each payment gateway must call so invoices are marked paid automatically.
Registrar module (domains) and provisioning module (dedicated servers) — resell HostiGuard inside WHMCS.
Domain search, pricing tables, server plans and WooCommerce provisioning on your own site.
Both packages are built from the exact code shipped with this version of HostiGuard, so they always match the API documented above.
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.
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 keysEvery 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
}
}
| 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 |
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 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.
/account
lockScope: 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"
]
}
}
}
/domains/pricing
lockScope: domains
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
}
]
}
}
/domains/check
lockScope: domains
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"
}
}
}
/domains
lockScope: 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
}
]
}
}
/domains/register
lockScope: domains
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
}
}
/servers/plans
lockScope: servers
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"
}
]
}
}
/servers
lockScope: 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
}
]
}
}
/servers/order
lockScope: servers
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
}
}
/orders/{id}
lockScope: account
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"
}
]
}
}
/clients
lockScope: 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"
}
]
}
}
/clients
lockScope: clients
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 |
| 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"
}
}
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
https://hostiguard.com/api/sms/send
Parameters
| to | required | Destination number in international format (+1234567890). |
| message | required | Text of the message. |
| api_secret | optional | Required 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
| 401 | Missing / invalid key, or wrong api_secret |
| 400 | Missing "to" or "message" |
| 402 | No SMS volume left in the bundle |
| 403 | The SMS service is inactive or suspended |
Keys and secrets are managed in Dashboard → SMS
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.
| Gateway | Webhook URL | Events 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.
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
Installation
hostiguard-whmcs-modules-1.0.0.zip · 15 KB · 6 files · v1.0.0
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
Installation
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. |
Both packages are built from the exact code shipped with this version of HostiGuard, so they always match the API documented above.
hostiguard-whmcs-modules-1.0.0.zip · 15 KB · 6 files · v1.0.0
hostiguard-connector-1.0.0.zip · 20 KB · 9 files · v1.0.0
Power your business with hosting built to grow.