Getting Started with the HOSTAFRICA Domain Reseller API (Custom Implementation)

A step-by-step guide

Evans

Last Update 12 days ago

For those building a custom integration instead of using the WHMCS or Blesta modules.
Step 1: Find the Domain Reseller Area
  • Log in to your HOSTAFRICA Client Panel.
  • In the left sidebar, scroll down to the Partner tools section.
  • Click Domain Reseller.
(This sits just above "API" in the sidebar, below Affiliates.)
Step 2: Open the API Documentation
  • Once inside the Domains Reseller area
    ("Manage your domain reseller account"),
    you'll see a sub-menu on the left with:
    Orders, Pricing, Domains, Integrations, API Docs and Logs
  • Click API Docs.
Step 3: Review the API Documentation Tabs
The API Docs page has three tabs:
  • Information
    — endpoint URL, authorisation method, and a working code example (this is what's covered below)
  • Calls
    — the full list of available API endpoints
  • Models
    — the data structures (Nameservers, Contacts, DNS Records, Addons, etc.) referenced by those calls
By default, you'll land on Information.
Step 4: Note Your Endpoint
Every request is made against a single endpoint, with the specific action appended as a path:
You'll append actions like /order/domains/renew to this base URL; see the Calls tab.
Step 5: Understand Authorisation
Every request needs two headers: username and token.
Username

— your login email address for the reseller account.

Token

— not your raw API Key.
You must generate it per request by hashing your API Key with your email address and the current UTC hour, then base64-encoding the result:

Note: the token is time-sensitive

— it's built using the current hour (gmdate("y-m-d H")), so it must be generated fresh at request time rather than reused or cached.

Your API Key itself is found under the Integrations tab in the Domains Reseller area
(Same place the WHMCS/Blesta module credentials come from).
Step 6: Try the Example Request
Replace YOUR_API_KEY and the login email with your own credentials, and swap the $action and $params for whichever call you need (see the Calls tab).
Step 7: Explore Available Calls & Models
Once authorisation works, refer to the Calls tab reference for every available endpoint (register, transfer, renew, DNS, nameservers, lookup, pricing, etc.) and the Models tab reference for the shape of nested fields like contacts, nameservers, and addons.
  • Calls tab:
  • Models tab:

Was this article helpful?

1 out of 1 liked this article

Still need help? Message Us