Domain Reseller API
Information:
Endpoint
https://portal.webway.host/modules/addons/DomainsReseller/api/index.php
Authorization
- Username: This is the email address of the reseller's client registered in your WHMCS.
- Token
- Token is an API Key transformed into SHA256 hash using the reseller's email address and the current time encoded with base64:
base64_encode(hash_hmac("sha256", "<api-key>", "<email>:<gmdate("y-m-d H")>)"))
Example
$endpoint = "https://portal.webway.host/modules/addons/DomainsReseller/api/index.php";
$action = "/order/domains/renew";
$params = [
"domain" => "example.com",
"regperiod" => "3",
"addons" => [
"dnsmanagement" => 0,
"emailforwarding" => 1,
"idprotection" => 1,
]
];
$headers = [
"username: email@example.com",
"token: ". base64_encode(hash_hmac("sha256", "1234567890QWERTYUIOPASDFGHJKLZXCVBNM", "email@example.com:".gmdate("y-m-d H")))
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "{$endpoint}{$action}");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($curl);
curl_close($curl);
Calls:
POST - /order/domains/register - Register Domain
- domain
Type: textValidators: required, text - regperiod
Type: numericValidators: required, numeric - domainfields
Type: textValidators: text - addons
Type: addons - nameservers
Type: nameserversValidators: required - contacts
Type: contactsValidators: required - idnLanguage
Type: textValidators: text
POST - /order/domains/transfer - Transfer Domain
- domain
Type: textValidators: required, text - eppcode
Type: textValidators: text - regperiod
Type: numericValidators: required, numeric - domainfields
Type: textValidators: text - addons
Type: addons - nameservers
Type: nameserversValidators: required - contacts
Type: contactsValidators: required - idnLanguage
Type: textValidators: text
POST - /order/domains/renew - Renew Domain
- domain
Type: textValidators: required, text - regperiod
Type: numericValidators: required, numeric - addons
Type: addons - idnLanguage
Type: textValidators: text
POST - /domains/{domain}/release - Release Domain
- domain
Type: textValidators: required, text - transfertag
Type: textValidators: required, text
GET - /domains/{domain}/eppcode - Get EPP Code
- domain
Type: textValidators: required, text
GET - /domains/{domain}/contact - Get Contact Details
- domain
Type: textValidators: required, text
POST - /domains/{domain}/contact - Save Contact Details
- domain
Type: textValidators: required, text - contactdetails
Type: contactdetailsValidators: required
GET - /domains/{domain}/lock - Get Registrar Lock
- domain
Type: textValidators: required, text
POST - /domains/{domain}/lock - Save Registrar Lock
- domain
Type: textValidators: required, text - lockstatus
Type: textValidators: required, text
GET - /domains/{domain}/dns - Get DNS
- domain
Type: textValidators: required, text
POST - /domains/{domain}/dns - Save DNS
- domain
Type: textValidators: required, text - dnsrecords
Type: dnsrecordsValidators: required
POST - /domains/{domain}/delete - Request Deletion
- domain
Type: textValidators: required, text
POST - /domains/{domain}/transfersync - Transfer Sync
- domain
Type: textValidators: required, text
POST - /domains/{domain}/sync - Domain Sync
- domain
Type: textValidators: required, text
GET - /domains/{domain}/email - Get Email Forwarding
- domain
Type: textValidators: required, text
POST - /domains/{domain}/email - Save Email Forwarding
- domain
Type: textValidators: required, text - prefix
Type: array - forwardto
Type: array
POST - /domains/{domain}/protectid - ID Protect Toggle
- domain
Type: textValidators: required, text - status
Type: intValidators: required, numeric
POST - /domains/lookup - Check Availability
- searchTerm
Type: textValidators: text - punyCodeSearchTerm
Type: textValidators: text - tldsToInclude
Type: arrayValidators: isArray - isIdnDomain
Type: boolean - premiumEnabled
Type: boolean
POST - /domains/lookup/suggestions - Get Domain Suggestions
- searchTerm
Type: textValidators: text - punyCodeSearchTerm
Type: textValidators: text - tldsToInclude
Type: arrayValidators: isArray - isIdnDomain
Type: boolean - premiumEnabled
Type: boolean - suggestionSettings
Type: arrayValidators: isArray
GET - /domains/{domain}/nameservers - Get Nameservers
- domain
Validators: required, text
POST - /domains/{domain}/nameservers - Save Nameservers
- domain
Validators: required, text - ns1
Validators: required, text - ns2
Validators: required, text - ns3
Validators: text - ns4
Validators: text - ns5
Validators: text
POST - /domains/{domain}/nameservers/register - Register Nameserver
- domain
Validators: required, text - nameserver
Validators: required, text - ipaddress
Validators: required, text
POST - /domains/{domain}/nameservers/modify - Modify Nameserver
- nameserver
Validators: required, text - currentipaddress
Validators: required, text - newipaddress
Validators: required, text
POST - /domains/{domain}/nameservers/delete - Delete Nameserver
- nameserver
Validators: required, text
GET - /order/pricing/domains/{type} - Cart Get Pricing Register
- domain
Type: textValidators: required, text
GET - /order/pricing/domains/{type} - Cart Get Pricing Renew
- domain
Type: textValidators: required, text
GET - /order/pricing/domains/{type} - Cart Get Pricing Transfer
- domain
Type: textValidators: required, text
GET - /billing/credits - Get Credits
GET - /version - Get Version
GET - /tlds - Get Available TLDs
GET - /tlds/pricing - Get TLDs Pricing
GET - /domains/{domain}/information - Get Domain Information
- domain
Type: textValidators: required, text
Models
Nameservers
- ns1
Type: textValidators: required, text - ns2
Type: textValidators: required, text - ns3
Type: textValidators: text - ns4
Type: textValidators: text - ns5
Type: textValidators: text
DNS Records
- hostname
Type: textValidators: required, text - type
Type: textValidators: required, text - address
Type: textValidators: required, text - priority
Type: numericValidators: required - recid
Type: textValidators: requires, text
Contacts
- registrant
Type: contact - tech
Type: contact - billing
Type: contact - admin
Type: contact
Contact Details
- Registrant
Type: contactValidators: required - Technical
Type: contactValidators: required - Billing
Type: contactValidators: required - Admin
Type: contactValidators: required
Contact
- firstname
Type: textValidators: required, text - lastname
Type: textValidators: required, text - fullname
Type: textValidators: required, text - companyname
Type: textValidators: required, text - email
Type: textValidators: required, text - address1
Type: textValidators: required, text - address2
Type: textValidators: text - city
Type: textValidators: required, text - state
Type: textValidators: required, text - postcode
Type: textValidators: required, text - country
Type: textValidators: required, text - phonenumber
Type: textValidators: required, text
Addons
- dnsmanagement
Type: numericValidators: numeric - emailforwarding
Type: numericValidators: numeric - idprotection
Type: numericValidators: numeric
Updated on: 08/08/2025
Thank you!
