API Documentation v1.0

DSites Domain Reseller Module API

Base Endpoint
https://my.dsites.pk/modules/addons/DomainsReseller/api/index.php

All requests should be sent to this base URL with the specific action path appended. This documentation covers the v1.0 release of the API.

Authentication

The API uses custom header-based authentication. Every request must include the following headers:

Header Description
username The email address of the reseller's client registered in WHMCS.
token Base64 encoded SHA256 HMAC hash. (See logic below)
Generating the Token

The token is generated using your API Key and a timestamp formatted as y-m-d H (Greenwich Mean Time).

base64_encode(
  hash_hmac("sha256", "<api-key>", "<email>:<gmdate('y-m-d H')>")
)
PHP Implementation Example
$headers = [
    "username: email@example.com",
    "token: ". base64_encode(hash_hmac("sha256", "YOUR_API_KEY", "email@example.com:".gmdate("y-m-d H")))
];

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://my.dsites.pk/modules/addons/DomainsReseller/api/index.php/order/domains/register");
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
// ... rest of curl setup

Domain Operations

POST

Register Domain

/order/domains/register
ParameterTypeValidators
domain text requiredtext
regperiod numeric requirednumeric
nameservers nameservers required
contacts contacts required
addons addons -
POST

Transfer Domain

/order/domains/transfer
domaintextrequired
eppcodetext-
regperiodnumericrequired
POST

Renew Domain

/order/domains/renew
domaintextrequired
regperiodnumericrequired

Nameserver Management

Get Nameservers
GET /domains/{domain}/nameservers
Save Nameservers
POST /domains/{domain}/nameservers
FieldValidator
ns1 / ns2required
ns3 / ns4 / ns5Optional
Child Nameservers (Registration)
POST /domains/{domain}/nameservers/register

Used for creating, modifying, or deleting private nameservers (e.g., ns1.yourdomain.com).

DNS & Email

DNS Records
GET /domains/{domain}/dns
POST /domains/{domain}/dns
Email Forwarding
GET /domains/{domain}/email
POST /domains/{domain}/email
prefixarrayThe source email prefix
forwardtoarrayThe destination email address

Data Models

Contact Object

Used for Registrant, Technical, Billing, and Admin details.

PropertyValidator
firstname, lastname, fullnamerequired
companynamerequired
emailrequired
address1, city, state, postcode, countryrequired
phonenumberrequired
Addons Object
FieldValue
dnsmanagement0 or 1
emailforwarding0 or 1
idprotection0 or 1

Utility Endpoints

Check Availability
POST /domains/lookup
Account Credits
GET /billing/credits
System TLDs
GET /tlds
API Version
GET /version