ক্লায়েন্ট এরিয়া

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.

REST + JSON API key (Bearer) Paid from your wallet 120 calls / minute v1

Getting started

  1. Sign in and open রিসেলার API in your client area. Ask for reseller access (it may need our approval).
  2. Create your API key - it is shown once, keep it secret. Optionally allow only your server's IP addresses.
  3. Add funds to your wallet: every order is paid from it at once.
  4. Connect: install a ready-made module, use the PHP SDK, or call the API directly as shown below.
API address
BASEhttps://relech.com/api/reseller/v1

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
{
    "success": true,
    "data": {
        "balance": {
            "amount": 200,
            "currency": "USD"
        }
    }
}
Failure
{
    "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

GET/account

Your wallet balance (every order is paid from it), your reseller group and its discounts.

Request
curl -X GET "https://relech.com/api/reseller/v1/account" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Answer (200)
{
    "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)

GET/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ধরনবিবরণ
tldstringOnly these extensions, comma separated: com,net,org
Request
curl -X GET "https://relech.com/api/reseller/v1/tlds?tld=com%2Cnet" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Answer (200)
{
    "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"
                    }
                }
            }
        ]
    }
}

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

POST/domains/register

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ধরনবিবরণ
domainrequiredstringexample.com
yearsinteger1 - 10 (default 1; premium names: 1)
nameserversarray2 - 4 host names (default: ours)
addonsarrayid_protection, dns_management, email_forwarding
premium_pricenumberFor a premium name: the price you accept (at least the price from /domains/check)
registrantrequiredobjectfirst_name, last_name, company?, email, address1, address2?, city, state?, postcode, country (ISO, 2 letters), phone (+CC.NUMBER)
Request
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"
    }
}'
Answer (201)
{
    "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

POST/domains/transfer

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ধরনবিবরণ
domainrequiredstringexample.org
auth_coderequiredstringThe transfer (EPP) code
yearsintegerDefault 1
nameserversarray2 - 4 host names
registrantrequiredobjectAs for a registration
Request
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"
    }
}'
Answer (201)
{
    "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

POST/domains/{domain}/renew

Extends the domain by the years given, with its active add-ons. Domains ordered through the API are never renewed automatically: you decide.

Parameterধরনবিবরণ
domainrequiredstringThe domain name, e.g. example.com (in the path).
yearsinteger1 - 10 (default 1)
Request
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
}'
Answer (200)
{
    "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

GET/domains

All your domains (also the ones bought in the shop), 50 per page.

Parameterধরনবিবরণ
statusstringactive, pending, expired ...
searchstringPart of the name
api_onlybooleanOnly domains ordered by API
pageintegerPage (default 1)
per_pageinteger1 - 100
Request
curl -X GET "https://relech.com/api/reseller/v1/domains?status=active&page=1" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Answer (200)
{
    "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

GET/domains/{domain}

Status, dates, nameservers, lock and add-ons of one domain.

Parameterধরনবিবরণ
domainrequiredstringThe domain name, e.g. example.com (in the path).
Request
curl -X GET "https://relech.com/api/reseller/v1/domains/example.com" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Answer (200)
{
    "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

POST/domains/{domain}/sync

Asks the registrar for the latest state (status, expiry date, nameservers) and answers with the domain. Use it to follow a transfer.

Parameterধরনবিবরণ
domainrequiredstringThe domain name, e.g. example.com (in the path).
Request
curl -X POST "https://relech.com/api/reseller/v1/domains/example.com/sync" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Answer (200)
{
    "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

GET/domains/{domain}/nameservers

The nameservers of the domain.

Parameterধরনবিবরণ
domainrequiredstringThe domain name, e.g. example.com (in the path).
Request
curl -X GET "https://relech.com/api/reseller/v1/domains/example.com/nameservers" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Answer (200)
{
    "success": true,
    "data": {
        "nameservers": [
            "ns1.example.net",
            "ns2.example.net"
        ]
    }
}

Change nameservers

PUT/domains/{domain}/nameservers

2 to 4 host names.

Parameterধরনবিবরণ
domainrequiredstringThe domain name, e.g. example.com (in the path).
nameserversrequiredarray2 - 4 host names
Request
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"
    ]
}'
Answer (200)
{
    "success": true,
    "data": {
        "nameservers": [
            "ns1.yourhost.com",
            "ns2.yourhost.com"
        ],
        "queued": false
    }
}

Get the registrant

GET/domains/{domain}/contacts

The owner contact of the domain.

Parameterধরনবিবরণ
domainrequiredstringThe domain name, e.g. example.com (in the path).
Request
curl -X GET "https://relech.com/api/reseller/v1/domains/example.com/contacts" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Answer (200)
{
    "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

PUT/domains/{domain}/contacts

Send only the fields that change. Some registries treat a new owner name as an owner change.

Parameterধরনবিবরণ
domainrequiredstringThe domain name, e.g. example.com (in the path).
registrantrequiredobjectAny of the registrant fields
Request
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"
    }
}'
Answer (200)
{
    "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

GET/domains/{domain}/lock

Whether the domain is locked against transfers.

Parameterধরনবিবরণ
domainrequiredstringThe domain name, e.g. example.com (in the path).
Request
curl -X GET "https://relech.com/api/reseller/v1/domains/example.com/lock" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Answer (200)
{
    "success": true,
    "data": {
        "locked": true
    }
}

Lock / unlock

PUT/domains/{domain}/lock

Unlock before asking for the transfer code.

Parameterধরনবিবরণ
domainrequiredstringThe domain name, e.g. example.com (in the path).
lockedrequiredbooleantrue to lock, false to unlock
Request
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
}'
Answer (200)
{
    "success": true,
    "data": {
        "locked": false,
        "queued": false
    }
}

Transfer (EPP) code

GET/domains/{domain}/auth-code

Only for an unlocked domain.

Parameterধরনবিবরণ
domainrequiredstringThe domain name, e.g. example.com (in the path).
Request
curl -X GET "https://relech.com/api/reseller/v1/domains/example.com/auth-code" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Answer (200)
{
    "success": true,
    "data": {
        "auth_code": "Xy7#kQ2!pL"
    }
}

Add-ons (privacy, DNS, e-mail forwarding)

PUT/domains/{domain}/addons/{addon}

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ধরনবিবরণ
domainrequiredstringThe domain name, e.g. example.com (in the path).
addonrequiredstringid_protection | dns_management | email_forwarding
enabledrequiredbooleantrue = order / switch on, false = switch off
Request
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
}'
Answer (200)
{
    "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

CodeHTTPMeaning
unauthorized401No key, or the key is wrong / revoked.
account_inactive403Your reseller account is waiting for approval or suspended.
ip_not_allowed403The call came from an address that is not in your list.
rate_limited429More than 120 calls in a minute. Wait a moment.
invalid_input422A parameter is missing or wrong; "fields" tells which.
not_found404Not in your account (or a wrong path).
insufficient_balance402Your balance does not cover the order ("required" and "balance" are given). Nothing was ordered.
api_disabled503The reseller API is switched off at the moment.
domain_unavailable409The name is taken.
domain_taken409The name is already registered with us.
premium_price_required409A premium name: send "premium_price" (the "price" is given).
transfer_not_possible409Wrong transfer code, or the domain is locked at its registrar.
period_not_offered422The extension is not sold for that number of years.
tld_not_supported422We do not sell that extension.
domain_locked409Unlock the domain first.
not_active409The domain must be active for that.
registry_unreachable503The registry did not answer; try again shortly.
registrar_error502The change failed at the registrar; try again later.