The current Nabtech reseller API uses Domain Nexus v2. It provides domain ordering and management, DNS, forwarding and account operations according to your reseller permissions. The former DomainsReseller endpoint and hourly-token examples are retired.
IN THIS ARTICLE
What do I need before calling the current Domain Nexus API?
Open the reseller area's API Access page. Use the exact credential Username or email and the API key revealed when you create or rotate it. Your WHMCS login password is not an API key. Restrict access to the integration's required functions and actual outgoing server addresses.
The current base is https://my.nabtech.co/modules/addons/nabtechresellerdns/api/index.php. Append a documented route such as /v2/profile. For email/API-key authentication, send X-Api-Email and X-Api-Key. HMAC applications use a separate documented header set; do not combine the two methods.
01 A reusable PHP request helper
This example requires PHP with cURL. Configure the two environment values through your server's secure process configuration so both web requests and scheduled workers can read them. Keep keys out of source code and request logs.
<?php
function nabtechRequest(string $method, string $path, ?array $payload = null, ?string $idempotencyKey = null): array
{
$base = 'https://my.nabtech.co/modules/addons/nabtechresellerdns/api/index.php';
$email = getenv('NABTECH_API_EMAIL');
$key = getenv('NABTECH_API_KEY');
if (!$email || !$key) {
throw new RuntimeException('Configure the API credential securely.');
}
$headers = ['Accept: application/json', 'X-Api-Email: ' . $email, 'X-Api-Key: ' . $key];
if ($idempotencyKey !== null) {
$headers[] = 'Idempotency-Key: ' . $idempotencyKey;
}
$ch = curl_init($base . $path);
if ($ch === false) {
throw new RuntimeException('Could not initialise cURL.');
}
$options = [
CURLOPT_CUSTOMREQUEST => strtoupper($method),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_SSL_VERIFYPEER => true,
CURLOPT_SSL_VERIFYHOST => 2,
];
if ($payload !== null) {
$headers[] = 'Content-Type: application/json';
$options[CURLOPT_POSTFIELDS] = json_encode($payload, JSON_THROW_ON_ERROR);
}
$options[CURLOPT_HTTPHEADER] = $headers;
curl_setopt_array($ch, $options);
$raw = curl_exec($ch);
$status = (int) curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$transportError = curl_error($ch);
curl_close($ch);
if ($raw === false) {
throw new RuntimeException('Transport error: ' . $transportError);
}
$result = json_decode($raw, true, 512, JSON_THROW_ON_ERROR);
if (!is_array($result)) {
throw new RuntimeException('Expected a JSON object.');
}
return ['http_status' => $status, 'response' => $result];
}
$profile = nabtechRequest('GET', '/v2/profile');
// Inspect http_status and response without logging credentials or secrets.
02 Handle writes and completion
For a mutation, pass its exact JSON fields and a stored Idempotency-Key. Some POST-based queries also require that key. Read the route's live schema rather than assuming every POST is the same. The helper does not automatically retry or decide whether a paid request completed.
Inspect http_status. Successful results normally contain data and meta; failures return a structured problem document. A 202 response means accepted work. Follow its operation or job reference and verify final state before marking the customer order complete.
03 Choose the right workflow
Resolve owned domain identifiers from the current domain collection. Check availability, registry requirements and price before registration or transfer. Retain the order, quote, idempotency key and operation reference together.
Read GET /v2/openapi.json with docs:read access for the installed contract. Start with profile and owned-resource reads, then test each authorised operation. For WHMCS, HostBill, Blesta or FOSSBilling, use the current connector published for your platform when it fits your integration.
If a request times out, inspect the existing operation before retrying. Reuse the same idempotency key only for the unchanged request; creating a new key can represent another purchase.
Related articles
- Migrate an integration from the retired DomainsReseller API to Domain Nexus v2
- Use the live Domain Nexus OpenAPI contract for your integration
- Retry Domain Nexus requests without creating duplicate domain operations
- Sign Domain Nexus v2 API requests with HMAC authentication
- Install the current Nabtech Domain Nexus registrar connector in WHMCS