Download OpenAPI specification:
A modern PHP RESTful API for WHMCS. JSON-only request and response format with Bearer token authentication.
This API provides a clean, well-structured set of REST endpoints for
client-facing operations:
account management, contacts, TLD pricing, orders, domains (including
.hu-specific hureg actions), WHOIS lookups, and emails.
Every request and response is JSON. Successful responses are always
shaped as {"status": "success", "data": {...}}; errors are always
{"status": "error", "error": {"code": "...", "message": "..."}}.
Many endpoints pass a WHMCS API result through directly as data;
where noted, only the documented fields are guaranteed and additional
passthrough fields may be present.
Public — no auth token required. Confirms the API process is up and can reach its database (a trivial SELECT 1 round-trip), for use by load balancers and uptime monitors.
{- "status": "success",
- "data": {
- "status": "ok",
- "time": "2019-08-24T14:15:22Z"
}
}Retrieve the authenticated client's account details.
| stats | boolean Include additional client statistics |
{- "status": "success",
- "data": {
- "id": "string",
- "firstname": "string",
- "lastname": "string",
- "companyname": "string",
- "email": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postcode": "string",
- "country": "string",
- "phonecc": "string",
- "phonenumber": "string",
- "phonenumberformatted": "string",
- "language": "string",
- "customfields1": "string",
- "customfields2": "string",
- "currency_code": "string"
}
}Update the authenticated client's billing details. All fields are optional — only provided fields are updated. The login email and password cannot be changed here.
| firstname | string |
| lastname | string |
| companyname | string |
| address1 | string |
| address2 | string |
| city | string |
| state | string |
| postcode | string |
| country | string 2-letter ISO country code |
| phonenumber | string |
{- "firstname": "string",
- "lastname": "string",
- "companyname": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postcode": "string",
- "country": "string",
- "phonenumber": "string"
}{- "status": "success",
- "data": {
- "message": "Account updated successfully"
}
}Retrieve contacts belonging to the authenticated client. All filters are optional.
| firstname | string |
| lastname | string |
| companyname | string |
string | |
| address1 | string |
| address2 | string |
| city | string |
| state | string |
| postcode | string |
| country | string |
| phonenumber | string |
| subaccount | boolean |
{- "status": "success",
- "data": {
- "result": "string",
- "totalresults": 0,
- "startnumber": 0,
- "numreturned": 0,
- "contacts": {
- "contact": [
- { }
]
}
}
}Add a new contact to the authenticated client's account. All fields are optional.
| firstname | string |
| lastname | string |
| companyname | string |
string | |
| address1 | string |
| address2 | string |
| city | string |
| state | string |
| postcode | string |
| country | string 2-letter ISO country code |
| phonenumber | string |
| generalemails | boolean |
| productemails | boolean |
| domainemails | boolean |
| invoiceemails | boolean |
| supportemails | boolean |
{- "firstname": "string",
- "lastname": "string",
- "companyname": "string",
- "email": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postcode": "string",
- "country": "string",
- "phonenumber": "string",
- "generalemails": true,
- "productemails": true,
- "domainemails": true,
- "invoiceemails": true,
- "supportemails": true
}{- "status": "success",
- "data": {
- "result": "string",
- "contactid": 0
}
}Retrieve a single contact's details. The contact must belong to the authenticated client.
| id required | integer >= 1 The contact ID |
{- "status": "success",
- "data": {
- "id": 0,
- "userid": 0,
- "firstname": "string",
- "lastname": "string",
- "companyname": "string",
- "email": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postcode": "string",
- "country": "string",
- "phonenumber": "string",
- "permissions": "string",
- "subaccount": "string",
- "generalemails": "string",
- "productemails": "string",
- "domainemails": "string",
- "invoiceemails": "string",
- "supportemails": "string"
}
}Update an existing contact. The contact must belong to the authenticated client.
| id required | integer >= 1 The contact ID |
| firstname | string |
| lastname | string |
| companyname | string |
string | |
| address1 | string |
| address2 | string |
| city | string |
| state | string |
| postcode | string |
| country | string 2-letter ISO country code |
| phonenumber | string |
| generalemails | boolean |
| productemails | boolean |
| domainemails | boolean |
| invoiceemails | boolean |
| supportemails | boolean |
{- "firstname": "string",
- "lastname": "string",
- "companyname": "string",
- "email": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postcode": "string",
- "country": "string",
- "phonenumber": "string",
- "generalemails": true,
- "productemails": true,
- "domainemails": true,
- "invoiceemails": true,
- "supportemails": true
}{- "status": "success",
- "data": {
- "result": "string",
- "contactid": 0
}
}Retrieve pricing for all configured TLDs. No filtering — always returns the full list.
{- "status": "success",
- "data": {
- "pricing": {
- "com": {
- "register": {
- "1": "14.95"
}, - "transfer": {
- "1": "14.95"
}, - "renew": {
- "1": "14.95"
}
}
}, - "currency": {
- "code": "USD"
}
}
}Retrieve orders belonging to the authenticated client.
| id | integer Filter by specific order ID |
| status | string Filter by order status |
| limitstart | integer >= 0 Default: 0 Pagination offset (default 0) |
| limitnum | integer [ 1 .. 250 ] Default: 25 Records per page (default 25, capped at 250) |
{- "status": "success",
- "data": { }
}Place a new order. Payment method is always set to bank transfer. All fields are optional.
Auto-accept logic: if the client has monthly payment, the order is automatically accepted after creation — each domain is registered or transferred (depending on its domaintype), donotrenew is set, and the order is accepted via acceptorder. Any step of that process that fails is reported back as a warnings entry on the response rather than failing the request, since the order itself has already been created by that point. If the client does not have monthly payment, the stored credit card is charged automatically instead.
| pid | Array of integers Product IDs to order |
| domain | Array of strings Domain names associated with products/domains |
| billingcycle | Array of strings Billing cycles for the products |
| domaintype | Array of strings Items Enum: "register" "transfer"
|
| customfields | Array of strings <byte> [ items <byte > ] Base64-encoded serialized custom field values |
| configoptions | Array of strings <byte> [ items <byte > ] Base64-encoded serialized configurable option values |
| promocode | string Promotion code to apply |
| regperiod | Array of integers Registration periods for domains |
| idnlanguage | Array of strings IDN language codes |
| eppcode | Array of strings EPP codes for domain transfers |
| nameserver1 | string |
| nameserver2 | string |
| nameserver3 | string |
| nameserver4 | string |
| nameserver5 | string |
| domainfields | Array of strings <byte> [ items <byte > ] Base64-encoded serialized additional domain fields — see the project README's "Additional Domain Fields" section for the field sets accepted per TLD. |
| contactid | integer Contact ID to apply to all domains |
| idprotection | Array of booleans Enable ID Protection per domain |
object
| |
| hostname | string VPS/dedicated server hostname |
| ns1prefix | string |
| ns2prefix | string |
| rootpw | string VPS/dedicated root password |
{- "pid": [
- 0
], - "domain": [
- "string"
], - "billingcycle": [
- "string"
], - "domaintype": [
- "register"
], - "customfields": [
- "string"
], - "configoptions": [
- "string"
], - "promocode": "string",
- "regperiod": [
- 0
], - "idnlanguage": [
- "string"
], - "eppcode": [
- "string"
], - "nameserver1": "string",
- "nameserver2": "string",
- "nameserver3": "string",
- "nameserver4": "string",
- "nameserver5": "string",
- "domainfields": [
- "string"
], - "contactid": 0,
- "idprotection": [
- true
], - "domainrenewals": {
- "property1": 0,
- "property2": 0
}, - "hostname": "string",
- "ns1prefix": "string",
- "ns2prefix": "string",
- "rootpw": "string"
}{- "status": "success",
- "data": {
- "result": "string",
- "orderid": 0,
- "invoiceid": 0,
- "serviceids": "string",
- "addonids": "string",
- "domainids": "string",
- "warnings": [
- "string"
]
}
}Retrieve domains belonging to the authenticated client.
| domainid | integer Filter by domain ID |
| domain | string Filter by domain name |
| limitstart | integer >= 0 Default: 0 Pagination offset (default 0) |
| limitnum | integer [ 1 .. 250 ] Default: 25 Records per page (default 25, capped at 250) |
{- "status": "success",
- "data": {
- "clientid": 0,
- "totalresults": 0,
- "startnumber": 0,
- "numreturned": 0,
- "domains": [
- {
- "id": "string",
- "regtype": "string",
- "domainname": "string",
- "regperiod": "string",
- "firstpaymentamount": "string",
- "recurringamount": "string",
- "regdate": "string",
- "expirydate": "string",
- "nextduedate": "string",
- "status": "string",
- "dnsmanagement": "string",
- "emailforwarding": "string",
- "idprotection": "string",
- "donotrenew": "string"
}
]
}
}| domain required | string Domain name (e.g. |
| contacts_xml required | string <byte> Base64-encoded WHOIS contact XML |
{- "contacts_xml": "string"
}{- "status": "success",
- "data": { }
}| domain required | string Domain name (e.g. |
{- "status": "success",
- "data": {
- "ns1": "string",
- "ns2": "string",
- "ns3": "string",
- "ns4": "string",
- "ns5": "string"
}
}| domain required | string Domain name (e.g. |
| ns1 | string |
| ns2 | string |
| ns3 | string |
| ns4 | string |
| ns5 | string |
{- "ns1": "string",
- "ns2": "string",
- "ns3": "string",
- "ns4": "string",
- "ns5": "string"
}{- "status": "success",
- "data": { }
}No body parameters. Returns the EPP code for the domain.
| domain required | string Domain name (e.g. |
{- "status": "success",
- "data": {
- "eppcode": "string"
}
}| domain required | string Domain name (e.g. |
| lockstatus required | boolean
|
{- "lockstatus": true
}{- "status": "success",
- "data": { }
}| domain required | string Domain name (e.g. |
| newtag required | string New registrar tag |
{- "newtag": "string"
}{- "status": "success",
- "data": { }
}Detailed domain information from the domain's registrar module, via WHMCS's standard GetDomainInformation dispatch. Registrar-agnostic — works for any registrar module that implements it.
| domain required | string Domain name (e.g. |
{- "status": "success",
- "data": {
- "Domain": "string",
- "Nameservers": [
- "string"
], - "ExpiryDate": "string",
- "RegistrantEmailAddress": "string",
- "IrtpTransferLock": true,
- "DomainContactChangePending": true
}
}Domain must belong to the authenticated client and use the hureg registrar, or this returns 400 INVALID_REGISTRAR.
| domain required | string Domain name (e.g. |
{- "status": "success",
- "data": { }
}Extended information from the hureg registrar module. Domain must belong to the authenticated client and use the hureg registrar, or this returns 400 INVALID_REGISTRAR.
| domain required | string Domain name (e.g. |
{- "status": "success",
- "data": {
- "getDomainExtIsDeprecated": true,
- "getDomainExtIsRequestedIncomplete": true,
- "getDomainExtIsPendingTransferIncomplete": true,
- "getDomainAuthInfoStatus": "ACTIVE"
}
}Cancel a pending EPP/auth code request for the domain. No body parameters. Domain must belong to the authenticated client and use the hureg registrar, or this returns 400 INVALID_REGISTRAR.
| domain required | string Domain name (e.g. |
{- "status": "success",
- "data": {
- "message": "EPP code request cancelled successfully"
}
}Pre-transfer registry check for a .hu domain. Because it is called before the transfer order exists, the domain does not have to be on the authenticated client's account — the only requirement is a well-formed .hu name.
| domain required | string Any |
{- "status": "success",
- "data": {
- "getDomainExtIsDeprecated": true,
- "getDomainExtIsTransferLocked": true,
- "getDomainExtRegistrarName": "string",
- "getDomainExtIsRegistryLocked": true
}
}Perform a WHOIS lookup on any domain. Not scoped to the authenticated client's own domains, but authentication is required like on every endpoint except /health.
| domain required | string Domain name to look up (e.g. |
{- "status": "success",
- "data": { }
}Retrieve emails sent to the authenticated client.
| date | string Filter by date |
| subject | string Filter by subject |
| limitstart | integer >= 0 Default: 0 Pagination offset (default 0) |
| limitnum | integer [ 1 .. 250 ] Records per page (capped at 250) |
{- "status": "success",
- "data": { }
}