Home Reseller About Us Contact
VPS reseller program · Developer guide v1.10

Kainode Reseller API: White-Label VPS & VDS

Order, deliver and manage Kainode VPS and VDS servers from your own billing platform, under your own brand. Works with WHMCS, Blesta, HostBill or your own code, for our cloud VDS and VPS plans.

01
Kainode Reseller API

Overview

Sell Kainode VPS and VDS servers under your own brand. Your billing system talks to ours; your customers never see Kainode.

Order

Get a price with your discount, order and pay from credit in one call.

Deliver

Fetch each server’s IP and root password, matched to the right order.

Control

Start, stop, reboot, reinstall, hostname, root password.

Monitor

Live status, CPU / memory / bandwidth gauges and one-hour charts.

Console

A one-time browser console for your customer. No logins shared.

Billing & support

Invoices, automatic renewals from credit, backups, tickets.

Base URL
https://portal.kainode.com/api/reseller/v1
Format
REST · JSON over HTTPS
Access
API key + your registered server IPs
Payment
Prepaid account credit
One rule

The API does exactly what you can do in the Kainode client area, nothing more. Your reseller account is a normal customer account: every order, invoice and server appears there too, under the same billing rules.

02
Setup

Getting started

Approval to first call in five steps.

  1. Get approved. Kainode enables API access on your account and registers your server’s public IP(s).
  2. Verify your email and accept the Terms once on Account → API.
  3. Create a key on the same page. It is shown once; copy it into your server’s secret store.
  4. Add credit in Account → Credits. Orders and renewals are paid from it.
  5. Call GET /me from your registered server:
Request
curl -s -H 'Authorization: Bearer $KEY' https://portal.kainode.com/api/reseller/v1/me
Response 200
{
  "data": {
    "id": 1042,
    "email": "you@example.com",
    "reseller_status": "approved",
    "default_currency": "USD",
    "credits": [{"currency": "USD", "amount": "245.50"}],
    "discount": {
      "code": "RESELLER10",
      "type": "percentage",
      "value": 10,
      "products": [33, 34, 35],
      "renewals": "first_invoice_only"
    },
    "key": {"name": "Billing server"}
  }
}

Security

TopicRule
HeaderAuthorization: Bearer <key> on every request. Keys in URLs are refused.
Allowed IPsOnly your registered IPs are accepted (403 IP_NOT_ALLOWED shows the IP we saw). New IP or higher limit: open a ticket.
Your data onlyServices, invoices, emails and tickets of other accounts always return 404.
Key storageServer-side only. Never in browser code, apps, emails or tickets. Kainode never asks for your key.
RotationCreate a new key, switch over, delete the old one on Account → API. Up to 5 keys.
Abuse protectionRepeated failed requests temporarily block the sending IP (429).
03
Workflow

Integration lifecycle

A few calls cover a server’s whole life, from any billing platform.

One server, from first call to cancellation1BrowseGET /productsplans, OS list2QuotePOST /ordersdry_run: true3Order + payPOST /orderspaid from credit4Wait for deliveryGET /services/{id}until IP appears5Hand overGET …/emails?latest=1IP + root password6Managestatus, stats, power,console, reinstall7Renewautomatic from credit,or POST /invoices/{id}/pay8CancelPOST …/cancelimmediate / end of period
Your platform doesCall
Show products and pricesGET /products, GET /products/{id}
Quote with your discountPOST /orders + "dry_run": true
Create a serverPOST /orders + Idempotency-Key header
Wait for deliveryGET /services/{id} every 10–15 s until server.primary_ipv4 is set
Send login detailsGET /services/{id}/emails?latest=1
Suspend / unsuspend your customerPOST /services/{id}/power stop / start
TerminatePOST /services/{id}/cancel immediate
Change passwordPOST /services/{id}/reset-password (returns the new password)
Customer panel buttons…/status, …/stats, …/network, …/power, …/console, …/reinstall
Works with any platform

WHMCS, Blesta, HostBill, FOSSBilling or your own code: map your platform’s create, suspend, unsuspend, terminate and password events to the calls above. Send your own ID as reference when ordering; GET /services?reference=… finds the service again at any time.

04
Ordering

Ordering

Quote first, then order with an idempotency key. You can never be charged twice.

GET /products/33 · checkout fields your customer fills
{
  "data": {
    "id": 33,
    "name": "VDS Pro",
    "category": "VDS-Singapore",
    "in_stock": true,
    "plans": [
      {
        "id": 87,
        "name": "Monthly",
        "billing_unit": "month",
        "price": "16.99",
        "currency": "USD"
      }
    ],
    "checkout_config": [
      {"name": "hostname", "type": "text", "required": true},
      {
        "name": "os",
        "type": "select",
        "required": true,
        "options": {"29": "Ubuntu 24.04", "30": "Debian 12"}
      }
    ]
  }
}
Order
curl -s -X POST https://portal.kainode.com/api/reseller/v1/orders -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' -H 'Idempotency-Key: billing-5531' \
  -d '{"product_id":33,"plan_id":87,"reference":"billing-5531",
       "checkout_config":{"hostname":"vps1.example.com","os":"29"}}'
Response 201 · ordered and paid
{
  "data": {
    "order_id": 761,
    "paid": true,
    "coupon": "RESELLER10",
    "invoice": {"id": 4920, "number": "INV-4888", "status": "paid", "total": "15.29"},
    "services": [{"id": 1024, "status": "active"}]
  }
}

What to send

FieldNeeded?What it means
product_idYesWhich server product to buy (from GET /products)
plan_idYesWhich billing period: daily, monthly or yearly (from the same product)
checkout_configYes for serversYour customer’s choices: hostname (e.g. vps1.example.com) and os (the number of the OS option, e.g. 29 = Ubuntu 24.04)
config_optionsOnly if the product has extrasExtra options listed on the product, as {"option id": choice}
referenceOptional, recommendedYour own order number, so you can find this server later with GET /services?reference=…
dry_runOptionalSend true to only see the final price. Nothing is ordered or charged

Idempotency-Key header: protection against double orders

If your connection drops during an order, you can’t know whether it went through. Send a unique value in the Idempotency-Key header (your own order number is ideal) and send the same value if you retry. Kainode then creates the order only once and returns the first result again, so your customer is never charged twice.

Price and credit

05
Operations

Delivery & server management

Login details for each server, then every button of the client area.

How the server email reaches your customer1Server deliveredKainode sends the“Service activated” email2Linked to servicethe email is taggedwith its service ID3You fetch itGET /services/{id}/emails?latest=14Your customeryou forward or rebrandIP + root password
GET /services/1024/emails?latest=1
{
  "data": {
    "id": 16134,
    "service_id": 1024,
    "subject": "Service activated",
    "status": "sent",
    "body_html": "<!DOCTYPE html> … branded email …",
    "body_text": "Service activated … IP Address: 203.0.113.25 … Root password: ••••••••"
  }
}
Re-deliveries (reinstall by Kainode, failed setup, custom OS)

When Kainode support reinstalls or re-delivers a server, the new login email is sent to your account and linked to the same service. To pass it on automatically, poll GET /emails?since=<last check> every few minutes: any email with a service_id belongs to that server. Fetch it with GET /emails/{id} and send your customer the new details.

GET /services/1024/status · live gauges
{
  "data": {
    "status": "running",
    "cpu_percent": 4.1,
    "memory_percent": 13.5,
    "bandwidth": {"used_bytes": 16106127360, "limit_bytes": 3221225472000, "percent": 0.5},
    "mem": 872833024,
    "maxmem": 6442450944,
    "maxdisk": 85899345920,
    "uptime": 86400
  }
}
Giving your customer a console without sharing any login1Your panelcustomer clicks“Open console”2Your server → APIPOST /services/{id}/console3One-time linkvalid 5 minutes,works once4Customer browserfull-screen console,no Kainode login
ActionCallNotes
PowerPOST …/power start | stop | reboot | shutdownshutdown is graceful, stop cuts power
ConsolePOST …/consoleReturns a one-time URL, valid 5 minutes. Create it only when your customer clicks
ChartsGET …/statsLast hour, one point per minute; poll once a minute at most
NetworkGET …/networkAddress, gateway, netmask
HostnamePOST …/hostname {"hostname"}
ReinstallGET …/os, POST …/reinstall {"os_id", "confirm": true}Erases all data
BackupsGET / POST / DELETE …/backups, POST …/backups/restoreIf the plan includes backups
06
Billing

Billing & renewals

Prepaid credit. Renewals follow the same billing rules as every Kainode customer.

Renewal timeline: the same billing rules as every Kainode customerBefore due dateRenewal invoicepaid from credit at onceif the balance covers itIf still unpaidReminder emailtop up and payDue datePeriod endsunpaid = overdueAfter graceSuspendedserver stoppedLaterTerminatedserver deleted
Tip

Keep enough credit for upcoming renewals, and run your daily invoice check at a time other than midnight server time.

07
Reference

Endpoint reference

All 31 calls. Lists accept ?page= and ?per_page= (max 100).

MethodPathPurpose / body
GET/meAccount, credit, discount
GET/productsProducts for sale, plans, prices
GET/products/{id}One product, options, checkout fields
POST/ordersQuote (dry_run) or order and pay
GET/servicesYour services · ?status= ?reference=
GET/services/{id}Service with server details
GET/services/{id}/statusLive state and gauges
GET/services/{id}/statsCharts, last hour
GET/services/{id}/networkIP, gateway, netmask
POST/services/{id}/poweraction: start, stop, reboot, shutdown
POST/services/{id}/consoleOne-time console URL
POST/services/{id}/hostnamehostname
POST/services/{id}/reset-passwordNew root password
GET/services/{id}/osOS list for reinstall
POST/services/{id}/reinstallos_id, confirm: true
POST/services/{id}/canceltype: immediate | end_of_period, reason?
GET/services/{id}/backupsBackups and plan limit
POST/services/{id}/backupsname, type?, compression?
POST/services/{id}/backups/restorebackup_id, confirm: true
DELETE/services/{id}/backupsbackup_id
GET/services/{id}/emailsEmails of this service · ?latest=1
GET/emailsAll account emails · ?since= ?subject=
GET/emails/{id}One email with body
GET/invoicesInvoices · ?status=pending
GET/invoices/{id}Invoice with items
POST/invoices/{id}/payPay in full from credit
GET/tickets/departmentsDepartments and priorities
GET/ticketsYour tickets
POST/ticketssubject, message, priority, department, service_id?
GET/tickets/{id}Ticket with messages
POST/tickets/{id}/replymessage
Conventions

Responses: {"data": …}, lists add meta. Money is a string with two decimals. Times are ISO 8601 with offset. Bytes are raw bytes; network and disk rates are bytes per second. Tickets are closed by Kainode support.

08
Reliability

Errors & limits

Every error has a stable code. Act on the code, retry only where it is safe.

Error shape
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The given data was invalid.",
    "details": {
      "checkout_config.hostname": ["The checkout config.hostname field format is invalid."]
    }
  }
}
HTTPCodeMeaning
400IDEMPOTENCY_KEY_REQUIREDOrder sent without the header
401UNAUTHENTICATEDKey missing, wrong or deleted, or account not active
402INSUFFICIENT_CREDITTop up; nothing was created
403IP_NOT_ALLOWED · EMAIL_NOT_VERIFIED · TOS_NOT_ACCEPTEDFix access as named
404NOT_FOUND · NOT_AVAILABLENot yours / feature not in this plan
409SERVICE_NOT_ACTIVE · NO_SERVER · NOT_CANCELLABLE · NOT_PAYABLE · BACKUP_LIMIT · IN_PROGRESSState does not allow it yet
422VALIDATION_ERROR · ORDER_REJECTED · IDEMPOTENCY_KEY_REUSED · INVALID_OSFix the request; details names fields
429RATE_LIMITED · TOO_MANY_* · BUSY · BACKUP_IN_PROGRESSWait Retry-After seconds, then retry
5xxSERVER_ERROR · UPSTREAM_ERROR · ACTION_FAILEDRetry later; nothing was charged
LimitValue
RequestsPer minute per account, shown on Account → API (headers X-RateLimit-*)
OrdersOne at a time per account
Per serverPower 10/min · console 10/min · password reset 3/10 min · reinstall 5/hour · new backup 1/15 min
Tickets1 new ticket per 30 s · 10 replies per minute
09
Help

Support

Real people, same team that runs the servers.

ChannelDetails
TicketsClient area at portal.kainode.com, or POST /tickets
Emailsupport@kainode.com
Phone+1 (307) 855-1647
Live chat & helpkainode.com/contact
Fastest help

Include the endpoint, time, HTTP status and error code. Never include your API key: Kainode will never ask for it.

10
Questions

Reseller API FAQ

Quick answers before you integrate.

What is the Kainode Reseller API?

The Kainode Reseller API is a REST API that lets hosting companies and developers order, deliver and manage Kainode VPS and VDS servers from their own billing platform. It covers ordering, server delivery, power control, a browser console, monitoring, invoices, renewals and support tickets.

Can I resell Kainode servers under my own brand?

Yes. The API is built for white-label reselling: your billing system talks to Kainode, you send your customers your own branded emails with the server IP and root password, and your customers never need to see Kainode.

Which billing platforms does it work with?

It works with any platform that can make HTTPS requests, including WHMCS, Blesta, HostBill, FOSSBilling or your own code. You map your platform's create, suspend, unsuspend, terminate and password events to the matching API calls.

How do resellers pay for servers?

Orders and renewals are paid from prepaid account credit. If your credit does not cover an order, the API returns 402 INSUFFICIENT_CREDIT and nothing is created, so you are never charged for a server you did not get.

Do resellers get a discount?

If your reseller account has a discount coupon, it is applied automatically to the products it covers, and you can see the final price before ordering by sending a quote request with dry_run set to true.

Which servers can I resell?

You can resell Kainode cloud servers, including Singapore KVM VPS plans and dedicated-CPU VDS plans. GET /products returns every product available to your account with its plans, prices and operating systems.

How do I get reseller API access?

Contact Kainode support to request access. Once approved, Kainode enables the API on your account and registers your server's public IP, then you verify your email, accept the Terms and create an API key under Account, API.

Is the Reseller API secure?

Yes. Every request needs an API key sent in the Authorization header and must come from one of your registered server IPs. Keys are shown once, can be rotated, and you only ever see your own services, invoices and tickets.

What happens if Kainode reinstalls or re-delivers my customer's server?

The new login email is sent to your reseller account and linked to the same service. Poll GET /emails?since=<last check> every few minutes; any email with a service_id belongs to that server. Fetch it with GET /emails/{id} and send your customer the new details.