Domain Reseller API
Sell domains under your own brand: search names (premium ones too), register, transfer and renew at your reseller price, and manage nameservers, contacts, locks and add-ons - from your website, your billing system or WHMCS.
Getting started
- Sign in and open রিসেলার API in your client area. Ask for reseller access (it may need our approval).
- Create your API key - it is shown once, keep it secret. Optionally allow only your server's IP addresses.
- Add funds to your wallet: every order is paid from it at once.
- Connect: install a ready-made module, use the PHP SDK, or call the API directly as shown below.
Authentication
Send your key with every call in the Authorization header (or as X-Api-Key). Use HTTPS only; never put the key in a browser page. GET /account answers with your balance and your discounts - a good first call.
GET /api/reseller/v1/account HTTP/1.1 Host: relech.com Authorization: Bearer rk_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Accept: application/json
A new key replaces the old one at once. Too many wrong keys from one address are blocked for a while.
Answers and errors
Every answer is JSON with success. On success the result is in data; on failure error.code tells what happened (stable, for your code) and error.message says it in words. The HTTP status matches.
{
"success": true,
"data": {
"balance": {
"amount": 200,
"currency": "USD"
}
}
}{
"success": false,
"error": {
"code": "insufficient_balance",
"message": "Your balance does not cover this order. Add funds and try again.",
"required": {
"amount": 11.6899999999999995026200849679298698902130126953125,
"currency": "USD"
},
"balance": {
"amount": 4.20000000000000017763568394002504646778106689453125,
"currency": "USD"
}
}
}Prices and payment
- Your price = our retail price minus the discount of your reseller group.
- GET /tlds gives both prices for every extension and period - import it into your shop and add your margin.
- Premium names are sold at the registry's price (no discount); confirm it with "premium_price".
- Domains ordered through the API never renew on their own: renew them with POST /domains/{domain}/renew.
- An order is an invoice in your account, paid from your wallet at once. When the balance is short nothing is ordered.
Ready-made connectors
WHMCS
A registrar module: domain search with premium names, register, transfer, renew, nameservers, lock, EPP code, contacts, ID protection, TLD price import and daily sync.
ডাউনলোডPHP SDK
One class for every call, with clear exceptions. PHP 7.4+, no dependencies. Examples included.
ডাউনলোডDHLMS
Running DHLMS? Buy the "DHLMS Domain Reseller" module in your Module Manager - it installs itself after the payment. Then add it as a domain registrar with your API key.
Account and prices
Your balance, your group discount and the price list to import into your own shop.
Your account
Your wallet balance (every order is paid from it), your reseller group and its discounts.
curl -X GET "https://relech.com/api/reseller/v1/account" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"
<?php
require 'reseller-php-sdk/autoload.php';
$api = new \ResellerApi\Client('YOUR_API_KEY');
try {
$data = $api->account();
print_r($data);
} catch (\ResellerApi\ApiException $e) {
echo $e->getErrorCode(), ': ', $e->getMessage();
}const res = await fetch('https://relech.com/api/reseller/v1/account', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json'
}
});
const answer = await res.json();
if (!answer.success) throw new Error(answer.error.code + ': ' + answer.error.message);
console.log(answer.data);import requests
res = requests.get(
'https://relech.com/api/reseller/v1/account',
headers={'Authorization': 'Bearer YOUR_API_KEY', 'Accept': 'application/json'},
timeout=60,
)
answer = res.json()
if not answer['success']:
raise Exception(answer['error']['code'] + ': ' + answer['error']['message'])
print(answer['data']) {
"success": true,
"data": {
"reseller_id": 7,
"username": "webhost",
"company": "Web Host Ltd",
"balance": {
"amount": 200,
"currency": "USD"
},
"group": {
"name": "Gold",
"domain_discount": 10,
"product_discount": 15
},
"domains": 42
}
}Price list (import TLDs)
Every extension we sell, with the retail price and YOUR price per number of years for registration, transfer and renewal, and the add-ons. Use it to import or update the prices of your own shop (the WHMCS module does it with "Sync TLD pricing").
| Parameter | ধরন | বিবরণ |
|---|---|---|
tld | string | Only these extensions, comma separated: com,net,org |
curl -X GET "https://relech.com/api/reseller/v1/tlds?tld=com%2Cnet" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"
<?php
require 'reseller-php-sdk/autoload.php';
$api = new \ResellerApi\Client('YOUR_API_KEY');
try {
$data = $api->tlds(['com', 'net']);
print_r($data);
} catch (\ResellerApi\ApiException $e) {
echo $e->getErrorCode(), ': ', $e->getMessage();
}const res = await fetch('https://relech.com/api/reseller/v1/tlds?tld=com%2Cnet', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json'
}
});
const answer = await res.json();
if (!answer.success) throw new Error(answer.error.code + ': ' + answer.error.message);
console.log(answer.data);import requests
res = requests.get(
'https://relech.com/api/reseller/v1/tlds',
headers={'Authorization': 'Bearer YOUR_API_KEY', 'Accept': 'application/json'},
params={
"tld": "com,net"
},
timeout=60,
)
answer = res.json()
if not answer['success']:
raise Exception(answer['error']['code'] + ': ' + answer['error']['message'])
print(answer['data']) {
"success": true,
"data": {
"currency": "USD",
"tlds": [
{
"tld": "com",
"register": {
"1": {
"retail": 10.9900000000000002131628207280300557613372802734375,
"price": 9.8900000000000005684341886080801486968994140625
},
"2": {
"retail": 21.980000000000000426325641456060111522674560546875,
"price": 19.780000000000001136868377216160297393798828125
}
},
"transfer": {
"1": {
"retail": 10.9900000000000002131628207280300557613372802734375,
"price": 9.8900000000000005684341886080801486968994140625
}
},
"renew": {
"1": {
"retail": 12.9900000000000002131628207280300557613372802734375,
"price": 11.6899999999999995026200849679298698902130126953125
}
},
"addons": {
"id_protection": {
"retail": 3,
"price": 2.70000000000000017763568394002504646778106689453125,
"per": "year"
}
}
}
]
}
}খুঁজুন
Ask the registry whether names are free - premium names come with their price.
Check availability
One name, a list (up to 20) or one name in several extensions. A premium name answers "premium": true and its price for one year: to register it you confirm that price.
| Parameter | ধরন | বিবরণ |
|---|---|---|
domain | string | One name: example.com |
domains | string | Several names, comma separated (max 20) |
name | string | A name without extension, used with "tlds" |
tlds | string | Extensions for "name": com,net,org |
curl -X GET "https://relech.com/api/reseller/v1/domains/check?name=example&tlds=com%2Cnet%2Cio" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"
<?php
require 'reseller-php-sdk/autoload.php';
$api = new \ResellerApi\Client('YOUR_API_KEY');
try {
$data = $api->check(['example.com', 'example.net', 'example.io']);
print_r($data);
} catch (\ResellerApi\ApiException $e) {
echo $e->getErrorCode(), ': ', $e->getMessage();
}const res = await fetch('https://relech.com/api/reseller/v1/domains/check?name=example&tlds=com%2Cnet%2Cio', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json'
}
});
const answer = await res.json();
if (!answer.success) throw new Error(answer.error.code + ': ' + answer.error.message);
console.log(answer.data);import requests
res = requests.get(
'https://relech.com/api/reseller/v1/domains/check',
headers={'Authorization': 'Bearer YOUR_API_KEY', 'Accept': 'application/json'},
params={
"name": "example",
"tlds": "com,net,io"
},
timeout=60,
)
answer = res.json()
if not answer['success']:
raise Exception(answer['error']['code'] + ': ' + answer['error']['message'])
print(answer['data']) {
"success": true,
"data": {
"results": [
{
"domain": "example.com",
"available": false,
"premium": false,
"reason": "taken"
},
{
"domain": "example.net",
"available": true,
"premium": false,
"reason": null,
"price": {
"register": {
"amount": 11.6899999999999995026200849679298698902130126953125,
"currency": "USD"
},
"renew": {
"amount": 12.589999999999999857891452847979962825775146484375,
"currency": "USD"
},
"years": 1
}
},
{
"domain": "example.io",
"available": true,
"premium": true,
"reason": null,
"price": {
"register": {
"amount": 2400,
"currency": "USD"
},
"years": 1
}
}
]
}
}Register, transfer, renew
Each call is an order paid from your balance at once - when the balance is too low nothing is ordered and you get "insufficient_balance".
Register a domain
Registers the domain for your customer (the registrant). Our admin, technical and billing contacts are used, as for every domain we hold. The answer comes when the registrar accepted the order; "status" is "active" or, for slower registries, "provisioning" (follow it with GET /domains/{domain} or /sync).
| Parameter | ধরন | বিবরণ |
|---|---|---|
domainrequired | string | example.com |
years | integer | 1 - 10 (default 1; premium names: 1) |
nameservers | array | 2 - 4 host names (default: ours) |
addons | array | id_protection, dns_management, email_forwarding |
premium_price | number | For a premium name: the price you accept (at least the price from /domains/check) |
registrantrequired | object | first_name, last_name, company?, email, address1, address2?, city, state?, postcode, country (ISO, 2 letters), phone (+CC.NUMBER) |
curl -X POST "https://relech.com/api/reseller/v1/domains/register" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"domain": "example.net",
"years": 1,
"nameservers": [
"ns1.yourhost.com",
"ns2.yourhost.com"
],
"addons": [
"id_protection"
],
"registrant": {
"first_name": "Jane",
"last_name": "Doe",
"company": "Example Ltd",
"email": "[email protected]",
"address1": "12 Main Street",
"city": "Dhaka",
"state": "Dhaka",
"postcode": "1207",
"country": "BD",
"phone": "+880.1712345678"
}
}'<?php
require 'reseller-php-sdk/autoload.php';
$api = new \ResellerApi\Client('YOUR_API_KEY');
$registrant = [
'first_name' => 'Jane',
'last_name' => 'Doe',
'company' => 'Example Ltd',
'email' => '[email protected]',
'address1' => '12 Main Street',
'city' => 'Dhaka',
'state' => 'Dhaka',
'postcode' => '1207',
'country' => 'BD',
'phone' => '+880.1712345678',
];
try {
$data = $api->register('example.net', 1, $registrant, ['ns1.yourhost.com', 'ns2.yourhost.com'], ['id_protection']);
print_r($data);
} catch (\ResellerApi\ApiException $e) {
echo $e->getErrorCode(), ': ', $e->getMessage();
}const res = await fetch('https://relech.com/api/reseller/v1/domains/register', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"domain": "example.net",
"years": 1,
"nameservers": [
"ns1.yourhost.com",
"ns2.yourhost.com"
],
"addons": [
"id_protection"
],
"registrant": {
"first_name": "Jane",
"last_name": "Doe",
"company": "Example Ltd",
"email": "[email protected]",
"address1": "12 Main Street",
"city": "Dhaka",
"state": "Dhaka",
"postcode": "1207",
"country": "BD",
"phone": "+880.1712345678"
}
})
});
const answer = await res.json();
if (!answer.success) throw new Error(answer.error.code + ': ' + answer.error.message);
console.log(answer.data);import requests
res = requests.post(
'https://relech.com/api/reseller/v1/domains/register',
headers={'Authorization': 'Bearer YOUR_API_KEY', 'Accept': 'application/json'},
json={
"domain": "example.net",
"years": 1,
"nameservers": [
"ns1.yourhost.com",
"ns2.yourhost.com"
],
"addons": [
"id_protection"
],
"registrant": {
"first_name": "Jane",
"last_name": "Doe",
"company": "Example Ltd",
"email": "[email protected]",
"address1": "12 Main Street",
"city": "Dhaka",
"state": "Dhaka",
"postcode": "1207",
"country": "BD",
"phone": "+880.1712345678"
}
},
timeout=60,
)
answer = res.json()
if not answer['success']:
raise Exception(answer['error']['code'] + ': ' + answer['error']['message'])
print(answer['data']) {
"success": true,
"data": {
"domain": {
"id": 1042,
"domain": "example.net",
"status": "active",
"registered_at": "2026-10-16T09:12:00+00:00",
"expires_at": "2027-10-16T09:12:00+00:00",
"years": 1,
"transfer_in": false,
"nameservers": [
"ns1.example.net",
"ns2.example.net"
],
"locked": true,
"addons": [
"id_protection"
],
"pending_changes": false,
"by_api": true
},
"order": {
"id": 5531,
"invoice_id": 8812,
"status": "active",
"amount": {
"amount": 9.4900000000000002131628207280300557613372802734375,
"currency": "USD"
},
"paid": true,
"balance": {
"amount": 190.509999999999990905052982270717620849609375,
"currency": "USD"
}
}
}
}Transfer a domain in
The same as a registration plus the transfer (EPP) code. The domain must be unlocked at its current registrar. The status is "pending_transfer" until the registry finished (usually up to 5 days).
| Parameter | ধরন | বিবরণ |
|---|---|---|
domainrequired | string | example.org |
auth_coderequired | string | The transfer (EPP) code |
years | integer | Default 1 |
nameservers | array | 2 - 4 host names |
registrantrequired | object | As for a registration |
curl -X POST "https://relech.com/api/reseller/v1/domains/transfer" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"domain": "example.org",
"auth_code": "Xy7#kQ2!pL",
"registrant": {
"first_name": "Jane",
"last_name": "Doe",
"company": "Example Ltd",
"email": "[email protected]",
"address1": "12 Main Street",
"city": "Dhaka",
"state": "Dhaka",
"postcode": "1207",
"country": "BD",
"phone": "+880.1712345678"
}
}'<?php
require 'reseller-php-sdk/autoload.php';
$api = new \ResellerApi\Client('YOUR_API_KEY');
$registrant = [
'first_name' => 'Jane',
'last_name' => 'Doe',
'company' => 'Example Ltd',
'email' => '[email protected]',
'address1' => '12 Main Street',
'city' => 'Dhaka',
'state' => 'Dhaka',
'postcode' => '1207',
'country' => 'BD',
'phone' => '+880.1712345678',
];
try {
$data = $api->transfer('example.org', 'Xy7#kQ2!pL', $registrant);
print_r($data);
} catch (\ResellerApi\ApiException $e) {
echo $e->getErrorCode(), ': ', $e->getMessage();
}const res = await fetch('https://relech.com/api/reseller/v1/domains/transfer', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"domain": "example.org",
"auth_code": "Xy7#kQ2!pL",
"registrant": {
"first_name": "Jane",
"last_name": "Doe",
"company": "Example Ltd",
"email": "[email protected]",
"address1": "12 Main Street",
"city": "Dhaka",
"state": "Dhaka",
"postcode": "1207",
"country": "BD",
"phone": "+880.1712345678"
}
})
});
const answer = await res.json();
if (!answer.success) throw new Error(answer.error.code + ': ' + answer.error.message);
console.log(answer.data);import requests
res = requests.post(
'https://relech.com/api/reseller/v1/domains/transfer',
headers={'Authorization': 'Bearer YOUR_API_KEY', 'Accept': 'application/json'},
json={
"domain": "example.org",
"auth_code": "Xy7#kQ2!pL",
"registrant": {
"first_name": "Jane",
"last_name": "Doe",
"company": "Example Ltd",
"email": "[email protected]",
"address1": "12 Main Street",
"city": "Dhaka",
"state": "Dhaka",
"postcode": "1207",
"country": "BD",
"phone": "+880.1712345678"
}
},
timeout=60,
)
answer = res.json()
if not answer['success']:
raise Exception(answer['error']['code'] + ': ' + answer['error']['message'])
print(answer['data']) {
"success": true,
"data": {
"domain": {
"id": 1042,
"domain": "example.org",
"status": "pending_transfer",
"registered_at": "2026-10-16T09:12:00+00:00",
"expires_at": "2027-10-16T09:12:00+00:00",
"years": 1,
"transfer_in": true,
"nameservers": [
"ns1.example.net",
"ns2.example.net"
],
"locked": true,
"addons": [],
"pending_changes": false,
"by_api": true
},
"order": {
"id": 5531,
"invoice_id": 8812,
"status": "active",
"amount": {
"amount": 9.4900000000000002131628207280300557613372802734375,
"currency": "USD"
},
"paid": true,
"balance": {
"amount": 190.509999999999990905052982270717620849609375,
"currency": "USD"
}
}
}
}Renew a domain
Extends the domain by the years given, with its active add-ons. Domains ordered through the API are never renewed automatically: you decide.
| Parameter | ধরন | বিবরণ |
|---|---|---|
domainrequired | string | The domain name, e.g. example.com (in the path). |
years | integer | 1 - 10 (default 1) |
curl -X POST "https://relech.com/api/reseller/v1/domains/example.com/renew" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"years": 2
}'<?php
require 'reseller-php-sdk/autoload.php';
$api = new \ResellerApi\Client('YOUR_API_KEY');
try {
$data = $api->renew('example.net', 2);
print_r($data);
} catch (\ResellerApi\ApiException $e) {
echo $e->getErrorCode(), ': ', $e->getMessage();
}const res = await fetch('https://relech.com/api/reseller/v1/domains/example.com/renew', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"years": 2
})
});
const answer = await res.json();
if (!answer.success) throw new Error(answer.error.code + ': ' + answer.error.message);
console.log(answer.data);import requests
res = requests.post(
'https://relech.com/api/reseller/v1/domains/example.com/renew',
headers={'Authorization': 'Bearer YOUR_API_KEY', 'Accept': 'application/json'},
json={
"years": 2
},
timeout=60,
)
answer = res.json()
if not answer['success']:
raise Exception(answer['error']['code'] + ': ' + answer['error']['message'])
print(answer['data']) {
"success": true,
"data": {
"domain": {
"id": 1042,
"domain": "example.net",
"status": "active",
"registered_at": "2026-10-16T09:12:00+00:00",
"expires_at": "2029-10-16T09:12:00+00:00",
"years": 1,
"transfer_in": false,
"nameservers": [
"ns1.example.net",
"ns2.example.net"
],
"locked": true,
"addons": [],
"pending_changes": false,
"by_api": true
},
"order": {
"id": 5531,
"invoice_id": 8812,
"status": "active",
"amount": {
"amount": 9.4900000000000002131628207280300557613372802734375,
"currency": "USD"
},
"paid": true,
"balance": {
"amount": 190.509999999999990905052982270717620849609375,
"currency": "USD"
}
}
}
}Manage domains
Changes go to the registrar at once. If the registrar does not answer, the change is kept and sent automatically a little later: the answer then says "queued": true.
Your domains
All your domains (also the ones bought in the shop), 50 per page.
| Parameter | ধরন | বিবরণ |
|---|---|---|
status | string | active, pending, expired ... |
search | string | Part of the name |
api_only | boolean | Only domains ordered by API |
page | integer | Page (default 1) |
per_page | integer | 1 - 100 |
curl -X GET "https://relech.com/api/reseller/v1/domains?status=active&page=1" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"
<?php
require 'reseller-php-sdk/autoload.php';
$api = new \ResellerApi\Client('YOUR_API_KEY');
try {
$data = $api->domains(['status' => 'active']);
print_r($data);
} catch (\ResellerApi\ApiException $e) {
echo $e->getErrorCode(), ': ', $e->getMessage();
}const res = await fetch('https://relech.com/api/reseller/v1/domains?status=active&page=1', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json'
}
});
const answer = await res.json();
if (!answer.success) throw new Error(answer.error.code + ': ' + answer.error.message);
console.log(answer.data);import requests
res = requests.get(
'https://relech.com/api/reseller/v1/domains',
headers={'Authorization': 'Bearer YOUR_API_KEY', 'Accept': 'application/json'},
params={
"status": "active",
"page": 1
},
timeout=60,
)
answer = res.json()
if not answer['success']:
raise Exception(answer['error']['code'] + ': ' + answer['error']['message'])
print(answer['data']) {
"success": true,
"data": {
"domains": [
{
"id": 1042,
"domain": "example.com",
"status": "active",
"registered_at": "2026-10-16T09:12:00+00:00",
"expires_at": "2027-10-16T09:12:00+00:00",
"years": 1,
"transfer_in": false,
"nameservers": [
"ns1.example.net",
"ns2.example.net"
],
"locked": true,
"addons": [],
"pending_changes": false,
"by_api": true
}
],
"page": 1,
"per_page": 50,
"total": 1,
"last_page": 1
}
}Domain details
Status, dates, nameservers, lock and add-ons of one domain.
| Parameter | ধরন | বিবরণ |
|---|---|---|
domainrequired | string | The domain name, e.g. example.com (in the path). |
curl -X GET "https://relech.com/api/reseller/v1/domains/example.com" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"
<?php
require 'reseller-php-sdk/autoload.php';
$api = new \ResellerApi\Client('YOUR_API_KEY');
try {
$data = $api->domain('example.com');
print_r($data);
} catch (\ResellerApi\ApiException $e) {
echo $e->getErrorCode(), ': ', $e->getMessage();
}const res = await fetch('https://relech.com/api/reseller/v1/domains/example.com', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json'
}
});
const answer = await res.json();
if (!answer.success) throw new Error(answer.error.code + ': ' + answer.error.message);
console.log(answer.data);import requests
res = requests.get(
'https://relech.com/api/reseller/v1/domains/example.com',
headers={'Authorization': 'Bearer YOUR_API_KEY', 'Accept': 'application/json'},
timeout=60,
)
answer = res.json()
if not answer['success']:
raise Exception(answer['error']['code'] + ': ' + answer['error']['message'])
print(answer['data']) {
"success": true,
"data": {
"domain": {
"id": 1042,
"domain": "example.com",
"status": "active",
"registered_at": "2026-10-16T09:12:00+00:00",
"expires_at": "2027-10-16T09:12:00+00:00",
"years": 1,
"transfer_in": false,
"nameservers": [
"ns1.example.net",
"ns2.example.net"
],
"locked": true,
"addons": [],
"pending_changes": false,
"by_api": true
}
}
}Refresh from the registrar
Asks the registrar for the latest state (status, expiry date, nameservers) and answers with the domain. Use it to follow a transfer.
| Parameter | ধরন | বিবরণ |
|---|---|---|
domainrequired | string | The domain name, e.g. example.com (in the path). |
curl -X POST "https://relech.com/api/reseller/v1/domains/example.com/sync" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"
<?php
require 'reseller-php-sdk/autoload.php';
$api = new \ResellerApi\Client('YOUR_API_KEY');
try {
$data = $api->sync('example.com');
print_r($data);
} catch (\ResellerApi\ApiException $e) {
echo $e->getErrorCode(), ': ', $e->getMessage();
}const res = await fetch('https://relech.com/api/reseller/v1/domains/example.com/sync', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json'
}
});
const answer = await res.json();
if (!answer.success) throw new Error(answer.error.code + ': ' + answer.error.message);
console.log(answer.data);import requests
res = requests.post(
'https://relech.com/api/reseller/v1/domains/example.com/sync',
headers={'Authorization': 'Bearer YOUR_API_KEY', 'Accept': 'application/json'},
timeout=60,
)
answer = res.json()
if not answer['success']:
raise Exception(answer['error']['code'] + ': ' + answer['error']['message'])
print(answer['data']) {
"success": true,
"data": {
"domain": {
"id": 1042,
"domain": "example.com",
"status": "active",
"registered_at": "2026-10-16T09:12:00+00:00",
"expires_at": "2027-10-16T09:12:00+00:00",
"years": 1,
"transfer_in": false,
"nameservers": [
"ns1.example.net",
"ns2.example.net"
],
"locked": true,
"addons": [],
"pending_changes": false,
"by_api": true
}
}
}Get nameservers
The nameservers of the domain.
| Parameter | ধরন | বিবরণ |
|---|---|---|
domainrequired | string | The domain name, e.g. example.com (in the path). |
curl -X GET "https://relech.com/api/reseller/v1/domains/example.com/nameservers" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"
<?php
require 'reseller-php-sdk/autoload.php';
$api = new \ResellerApi\Client('YOUR_API_KEY');
try {
$data = $api->nameservers('example.com');
print_r($data);
} catch (\ResellerApi\ApiException $e) {
echo $e->getErrorCode(), ': ', $e->getMessage();
}const res = await fetch('https://relech.com/api/reseller/v1/domains/example.com/nameservers', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json'
}
});
const answer = await res.json();
if (!answer.success) throw new Error(answer.error.code + ': ' + answer.error.message);
console.log(answer.data);import requests
res = requests.get(
'https://relech.com/api/reseller/v1/domains/example.com/nameservers',
headers={'Authorization': 'Bearer YOUR_API_KEY', 'Accept': 'application/json'},
timeout=60,
)
answer = res.json()
if not answer['success']:
raise Exception(answer['error']['code'] + ': ' + answer['error']['message'])
print(answer['data']) {
"success": true,
"data": {
"nameservers": [
"ns1.example.net",
"ns2.example.net"
]
}
}Change nameservers
2 to 4 host names.
| Parameter | ধরন | বিবরণ |
|---|---|---|
domainrequired | string | The domain name, e.g. example.com (in the path). |
nameserversrequired | array | 2 - 4 host names |
curl -X PUT "https://relech.com/api/reseller/v1/domains/example.com/nameservers" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"nameservers": [
"ns1.yourhost.com",
"ns2.yourhost.com"
]
}'<?php
require 'reseller-php-sdk/autoload.php';
$api = new \ResellerApi\Client('YOUR_API_KEY');
try {
$data = $api->setNameservers('example.com', ['ns1.yourhost.com', 'ns2.yourhost.com']);
print_r($data);
} catch (\ResellerApi\ApiException $e) {
echo $e->getErrorCode(), ': ', $e->getMessage();
}const res = await fetch('https://relech.com/api/reseller/v1/domains/example.com/nameservers', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"nameservers": [
"ns1.yourhost.com",
"ns2.yourhost.com"
]
})
});
const answer = await res.json();
if (!answer.success) throw new Error(answer.error.code + ': ' + answer.error.message);
console.log(answer.data);import requests
res = requests.put(
'https://relech.com/api/reseller/v1/domains/example.com/nameservers',
headers={'Authorization': 'Bearer YOUR_API_KEY', 'Accept': 'application/json'},
json={
"nameservers": [
"ns1.yourhost.com",
"ns2.yourhost.com"
]
},
timeout=60,
)
answer = res.json()
if not answer['success']:
raise Exception(answer['error']['code'] + ': ' + answer['error']['message'])
print(answer['data']) {
"success": true,
"data": {
"nameservers": [
"ns1.yourhost.com",
"ns2.yourhost.com"
],
"queued": false
}
}Get the registrant
The owner contact of the domain.
| Parameter | ধরন | বিবরণ |
|---|---|---|
domainrequired | string | The domain name, e.g. example.com (in the path). |
curl -X GET "https://relech.com/api/reseller/v1/domains/example.com/contacts" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"
<?php
require 'reseller-php-sdk/autoload.php';
$api = new \ResellerApi\Client('YOUR_API_KEY');
try {
$data = $api->contacts('example.com');
print_r($data);
} catch (\ResellerApi\ApiException $e) {
echo $e->getErrorCode(), ': ', $e->getMessage();
}const res = await fetch('https://relech.com/api/reseller/v1/domains/example.com/contacts', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json'
}
});
const answer = await res.json();
if (!answer.success) throw new Error(answer.error.code + ': ' + answer.error.message);
console.log(answer.data);import requests
res = requests.get(
'https://relech.com/api/reseller/v1/domains/example.com/contacts',
headers={'Authorization': 'Bearer YOUR_API_KEY', 'Accept': 'application/json'},
timeout=60,
)
answer = res.json()
if not answer['success']:
raise Exception(answer['error']['code'] + ': ' + answer['error']['message'])
print(answer['data']) {
"success": true,
"data": {
"registrant": {
"first_name": "Jane",
"last_name": "Doe",
"company": "Example Ltd",
"email": "[email protected]",
"address1": "12 Main Street",
"city": "Dhaka",
"state": "Dhaka",
"postcode": "1207",
"country": "BD",
"phone": "+880.1712345678",
"address2": ""
}
}
}Change the registrant
Send only the fields that change. Some registries treat a new owner name as an owner change.
| Parameter | ধরন | বিবরণ |
|---|---|---|
domainrequired | string | The domain name, e.g. example.com (in the path). |
registrantrequired | object | Any of the registrant fields |
curl -X PUT "https://relech.com/api/reseller/v1/domains/example.com/contacts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"registrant": {
"email": "[email protected]",
"phone": "+880.1811111111"
}
}'<?php
require 'reseller-php-sdk/autoload.php';
$api = new \ResellerApi\Client('YOUR_API_KEY');
try {
$data = $api->setContacts('example.com', ['email' => '[email protected]']);
print_r($data);
} catch (\ResellerApi\ApiException $e) {
echo $e->getErrorCode(), ': ', $e->getMessage();
}const res = await fetch('https://relech.com/api/reseller/v1/domains/example.com/contacts', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"registrant": {
"email": "[email protected]",
"phone": "+880.1811111111"
}
})
});
const answer = await res.json();
if (!answer.success) throw new Error(answer.error.code + ': ' + answer.error.message);
console.log(answer.data);import requests
res = requests.put(
'https://relech.com/api/reseller/v1/domains/example.com/contacts',
headers={'Authorization': 'Bearer YOUR_API_KEY', 'Accept': 'application/json'},
json={
"registrant": {
"email": "[email protected]",
"phone": "+880.1811111111"
}
},
timeout=60,
)
answer = res.json()
if not answer['success']:
raise Exception(answer['error']['code'] + ': ' + answer['error']['message'])
print(answer['data']) {
"success": true,
"data": {
"registrant": {
"first_name": "Jane",
"last_name": "Doe",
"company": "Example Ltd",
"email": "[email protected]",
"address1": "12 Main Street",
"city": "Dhaka",
"state": "Dhaka",
"postcode": "1207",
"country": "BD",
"phone": "+880.1811111111"
},
"queued": false
}
}Transfer lock state
Whether the domain is locked against transfers.
| Parameter | ধরন | বিবরণ |
|---|---|---|
domainrequired | string | The domain name, e.g. example.com (in the path). |
curl -X GET "https://relech.com/api/reseller/v1/domains/example.com/lock" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"
<?php
require 'reseller-php-sdk/autoload.php';
$api = new \ResellerApi\Client('YOUR_API_KEY');
try {
$data = $api->lock('example.com');
print_r($data);
} catch (\ResellerApi\ApiException $e) {
echo $e->getErrorCode(), ': ', $e->getMessage();
}const res = await fetch('https://relech.com/api/reseller/v1/domains/example.com/lock', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json'
}
});
const answer = await res.json();
if (!answer.success) throw new Error(answer.error.code + ': ' + answer.error.message);
console.log(answer.data);import requests
res = requests.get(
'https://relech.com/api/reseller/v1/domains/example.com/lock',
headers={'Authorization': 'Bearer YOUR_API_KEY', 'Accept': 'application/json'},
timeout=60,
)
answer = res.json()
if not answer['success']:
raise Exception(answer['error']['code'] + ': ' + answer['error']['message'])
print(answer['data']) {
"success": true,
"data": {
"locked": true
}
}Lock / unlock
Unlock before asking for the transfer code.
| Parameter | ধরন | বিবরণ |
|---|---|---|
domainrequired | string | The domain name, e.g. example.com (in the path). |
lockedrequired | boolean | true to lock, false to unlock |
curl -X PUT "https://relech.com/api/reseller/v1/domains/example.com/lock" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"locked": false
}'<?php
require 'reseller-php-sdk/autoload.php';
$api = new \ResellerApi\Client('YOUR_API_KEY');
try {
$data = $api->setLock('example.com', false);
print_r($data);
} catch (\ResellerApi\ApiException $e) {
echo $e->getErrorCode(), ': ', $e->getMessage();
}const res = await fetch('https://relech.com/api/reseller/v1/domains/example.com/lock', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"locked": false
})
});
const answer = await res.json();
if (!answer.success) throw new Error(answer.error.code + ': ' + answer.error.message);
console.log(answer.data);import requests
res = requests.put(
'https://relech.com/api/reseller/v1/domains/example.com/lock',
headers={'Authorization': 'Bearer YOUR_API_KEY', 'Accept': 'application/json'},
json={
"locked": False
},
timeout=60,
)
answer = res.json()
if not answer['success']:
raise Exception(answer['error']['code'] + ': ' + answer['error']['message'])
print(answer['data']) {
"success": true,
"data": {
"locked": false,
"queued": false
}
}Transfer (EPP) code
Only for an unlocked domain.
| Parameter | ধরন | বিবরণ |
|---|---|---|
domainrequired | string | The domain name, e.g. example.com (in the path). |
curl -X GET "https://relech.com/api/reseller/v1/domains/example.com/auth-code" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"
<?php
require 'reseller-php-sdk/autoload.php';
$api = new \ResellerApi\Client('YOUR_API_KEY');
try {
$data = $api->authCode('example.com');
print_r($data);
} catch (\ResellerApi\ApiException $e) {
echo $e->getErrorCode(), ': ', $e->getMessage();
}const res = await fetch('https://relech.com/api/reseller/v1/domains/example.com/auth-code', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json'
}
});
const answer = await res.json();
if (!answer.success) throw new Error(answer.error.code + ': ' + answer.error.message);
console.log(answer.data);import requests
res = requests.get(
'https://relech.com/api/reseller/v1/domains/example.com/auth-code',
headers={'Authorization': 'Bearer YOUR_API_KEY', 'Accept': 'application/json'},
timeout=60,
)
answer = res.json()
if not answer['success']:
raise Exception(answer['error']['code'] + ': ' + answer['error']['message'])
print(answer['data']) {
"success": true,
"data": {
"auth_code": "Xy7#kQ2!pL"
}
}Add-ons (privacy, DNS, e-mail forwarding)
Switch an add-on on (paid from your balance at your price, for the domain's period) or off. {addon}: id_protection, dns_management or email_forwarding.
| Parameter | ধরন | বিবরণ |
|---|---|---|
domainrequired | string | The domain name, e.g. example.com (in the path). |
addonrequired | string | id_protection | dns_management | email_forwarding |
enabledrequired | boolean | true = order / switch on, false = switch off |
curl -X PUT "https://relech.com/api/reseller/v1/domains/example.com/addons/id_protection" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"enabled": true
}'<?php
require 'reseller-php-sdk/autoload.php';
$api = new \ResellerApi\Client('YOUR_API_KEY');
try {
$data = $api->addon('example.com', 'id_protection', true);
print_r($data);
} catch (\ResellerApi\ApiException $e) {
echo $e->getErrorCode(), ': ', $e->getMessage();
}const res = await fetch('https://relech.com/api/reseller/v1/domains/example.com/addons/id_protection', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"enabled": true
})
});
const answer = await res.json();
if (!answer.success) throw new Error(answer.error.code + ': ' + answer.error.message);
console.log(answer.data);import requests
res = requests.put(
'https://relech.com/api/reseller/v1/domains/example.com/addons/id_protection',
headers={'Authorization': 'Bearer YOUR_API_KEY', 'Accept': 'application/json'},
json={
"enabled": True
},
timeout=60,
)
answer = res.json()
if not answer['success']:
raise Exception(answer['error']['code'] + ': ' + answer['error']['message'])
print(answer['data']) {
"success": true,
"data": {
"domain": {
"id": 1042,
"domain": "example.com",
"status": "active",
"registered_at": "2026-10-16T09:12:00+00:00",
"expires_at": "2027-10-16T09:12:00+00:00",
"years": 1,
"transfer_in": false,
"nameservers": [
"ns1.example.net",
"ns2.example.net"
],
"locked": true,
"addons": [
"id_protection"
],
"pending_changes": false,
"by_api": true
},
"order": {
"id": 5531,
"invoice_id": 8812,
"status": "active",
"amount": {
"amount": 9.4900000000000002131628207280300557613372802734375,
"currency": "USD"
},
"paid": true,
"balance": {
"amount": 190.509999999999990905052982270717620849609375,
"currency": "USD"
}
}
}
}Error codes
| Code | HTTP | Meaning |
|---|---|---|
unauthorized | 401 | No key, or the key is wrong / revoked. |
account_inactive | 403 | Your reseller account is waiting for approval or suspended. |
ip_not_allowed | 403 | The call came from an address that is not in your list. |
rate_limited | 429 | More than 120 calls in a minute. Wait a moment. |
invalid_input | 422 | A parameter is missing or wrong; "fields" tells which. |
not_found | 404 | Not in your account (or a wrong path). |
insufficient_balance | 402 | Your balance does not cover the order ("required" and "balance" are given). Nothing was ordered. |
api_disabled | 503 | The reseller API is switched off at the moment. |
domain_unavailable | 409 | The name is taken. |
domain_taken | 409 | The name is already registered with us. |
premium_price_required | 409 | A premium name: send "premium_price" (the "price" is given). |
transfer_not_possible | 409 | Wrong transfer code, or the domain is locked at its registrar. |
period_not_offered | 422 | The extension is not sold for that number of years. |
tld_not_supported | 422 | We do not sell that extension. |
domain_locked | 409 | Unlock the domain first. |
not_active | 409 | The domain must be active for that. |
registry_unreachable | 503 | The registry did not answer; try again shortly. |
registrar_error | 502 | The change failed at the registrar; try again later. |