Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including planethoster-api with all npm packages installed. Try it out:

var planethosterApi = require("planethoster-api")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

planethoster-api v1.6.3

An async API wrapper for the PlanetHoster API

Planethoster Api


Build Status License: MIT

An async API wrapper for the PlanetHoster API, every call will return a promise

Please refer to the documentation of the PlanetHoster API for all calls explained.

You can try it now with NPM RunKit


npm install planethoster-api


In order to use this module, you have to import it first

var planethosterApi = require('planethoster-api');

Then, initialize the PlanetHoster object with the keys you obtained from the PlanetHoster Dashboard

const planethosterClient = new planethosterApi({
  api_key: 'API_KEY',
  api_user: 'API_USER'


// Domain API
async function domainTestConnection(){
    let res = await planethosterClient.domain().testConnection();


// World API
async function worldTestConnection(){
    let res = await;


Possible functions

Make sure to checkout documentation for specific parameters and more explanation ApiDoc


let res = await planethosterClient.domain()[...] // options down below
.tldPrices() // Returns domain name prices for registration, renewal and transfer.
.accountInfo() // Returns information pertinent to your reseller account. (active doamin, credit left, etc..)
.checkAvailability({}) // Checks whether a domain name is available to register.
.domainInfo() // Retrieve information for a domain which you successfully registered or created a transfer order.
.getContactDetails() // Returns the contact information (WHOIS information) for the active domain name.
.getNameservers() // Returns the nameservers for a registered domain name.
.getPhDnsRecord() // Retrieves the DNS records for the active domain name registered with PlanetHoster.
.getRegistrarLock() // Get the lock status of a registered domain name.
.saveContactDetails() // Saves the contact information (WHOIS information) for the given active domain name.
.saveNameservers() // Update nameservers associated with your domain.
.savePhDnsRecords() // Saves the DNS records for the active domain name registered with PlanetHoster.
.saveRegistrarLock() // Lock or unlock a registered and active domain name.
.emailEppCode() // Email the domain name registrant their EPP code (also called Auth Info) for the given domain.
.registerDomain() // Attempts to register a domain name for 1 to 10 years.
.renewDomain() // Renew an already active domain name for 1-10 years.
.transferDomain() // Transfer a domain name from your current registrar to PlanetHoster.
.deletePhDnsZone() // Deletes the DNS zone on the PlanetHoster DNS servers for the given domain.

World (Hosting)

* What is a world hosting?

let res = await[...] // options down below
.getAccounts() // Displays The World account and all World sub accounts information.
.createAccount() // Creates a world hosting account, assigns the requested resources and install a CMS
.suspendAccount() // Proceed to the suspension of a World account.
.unsuspendAccount() // Reactivate suspended world account.
.modifyRessources() // Modify the resources associated with a World account.
.upgradePlan() // Increases resources associated with The World account.
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free