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.
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.
https://portal.kainode.com/api/reseller/v1The 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.
Getting started
Approval to first call in five steps.
- Get approved. Kainode enables API access on your account and registers your server’s public IP(s).
- Verify your email and accept the Terms once on Account → API.
- Create a key on the same page. It is shown once; copy it into your server’s secret store.
- Add credit in Account → Credits. Orders and renewals are paid from it.
- Call
GET /mefrom your registered server:
curl -s -H 'Authorization: Bearer $KEY' https://portal.kainode.com/api/reseller/v1/me{
"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
| Topic | Rule |
|---|---|
| Header | Authorization: Bearer <key> on every request. Keys in URLs are refused. |
| Allowed IPs | Only your registered IPs are accepted (403 IP_NOT_ALLOWED shows the IP we saw). New IP or higher limit: open a ticket. |
| Your data only | Services, invoices, emails and tickets of other accounts always return 404. |
| Key storage | Server-side only. Never in browser code, apps, emails or tickets. Kainode never asks for your key. |
| Rotation | Create a new key, switch over, delete the old one on Account → API. Up to 5 keys. |
| Abuse protection | Repeated failed requests temporarily block the sending IP (429). |
Integration lifecycle
A few calls cover a server’s whole life, from any billing platform.
| Your platform does | Call |
|---|---|
| Show products and prices | GET /products, GET /products/{id} |
| Quote with your discount | POST /orders + "dry_run": true |
| Create a server | POST /orders + Idempotency-Key header |
| Wait for delivery | GET /services/{id} every 10–15 s until server.primary_ipv4 is set |
| Send login details | GET /services/{id}/emails?latest=1 |
| Suspend / unsuspend your customer | POST /services/{id}/power stop / start |
| Terminate | POST /services/{id}/cancel immediate |
| Change password | POST /services/{id}/reset-password (returns the new password) |
| Customer panel buttons | …/status, …/stats, …/network, …/power, …/console, …/reinstall |
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.
Ordering
Quote first, then order with an idempotency key. You can never be charged twice.
{
"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"}
}
]
}
}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"}}'{
"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
| Field | Needed? | What it means |
|---|---|---|
product_id | Yes | Which server product to buy (from GET /products) |
plan_id | Yes | Which billing period: daily, monthly or yearly (from the same product) |
checkout_config | Yes for servers | Your customer’s choices: hostname (e.g. vps1.example.com) and os (the number of the OS option, e.g. 29 = Ubuntu 24.04) |
config_options | Only if the product has extras | Extra options listed on the product, as {"option id": choice} |
reference | Optional, recommended | Your own order number, so you can find this server later with GET /services?reference=… |
dry_run | Optional | Send 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.
- New order = new value. Retry of the same order = same value.
- Using a value again for a different order is refused (
422 IDEMPOTENCY_KEY_REUSED).
Price and credit
- Your discount coupon, if any, is applied automatically to the products it covers; others are charged normally.
- Not enough credit:
402 INSUFFICIENT_CREDITand nothing is created. 201= ordered and paid.202= ordered, payment pending: pay withPOST /invoices/{id}/pay.
Delivery & server management
Login details for each server, then every button of the client area.
{
"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: ••••••••"
}
}body_textis the easiest to read: take the root password from it, and the IP fromGET /services/{id}, then send your customer your own branded email.POST /services/{id}/reset-passwordreturns the new password directly.- Email history is kept for a limited time: store delivery details as soon as a server is ready.
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.
{
"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
}
}| Action | Call | Notes |
|---|---|---|
| Power | POST …/power start | stop | reboot | shutdown | shutdown is graceful, stop cuts power |
| Console | POST …/console | Returns a one-time URL, valid 5 minutes. Create it only when your customer clicks |
| Charts | GET …/stats | Last hour, one point per minute; poll once a minute at most |
| Network | GET …/network | Address, gateway, netmask |
| Hostname | POST …/hostname {"hostname"} | |
| Reinstall | GET …/os, POST …/reinstall {"os_id", "confirm": true} | Erases all data |
| Backups | GET / POST / DELETE …/backups, POST …/backups/restore | If the plan includes backups |
Billing & renewals
Prepaid credit. Renewals follow the same billing rules as every Kainode customer.
- Renewal invoices are created before the due date and paid from your credit automatically when the balance covers them.
- Invoice, reminder, suspension and termination timing follow Kainode’s billing settings for all customers; each invoice and service shows its own dates (
due_at,expires_at). - Check
GET /invoices?status=pendingdaily and pay anything open withPOST /invoices/{id}/pay. - Your customers’ own non-payment is handled in your platform: stop or cancel the server as you decide.
Keep enough credit for upcoming renewals, and run your daily invoice check at a time other than midnight server time.
Endpoint reference
All 31 calls. Lists accept ?page= and ?per_page= (max 100).
| Method | Path | Purpose / body |
|---|---|---|
| GET | /me | Account, credit, discount |
| GET | /products | Products for sale, plans, prices |
| GET | /products/{id} | One product, options, checkout fields |
| POST | /orders | Quote (dry_run) or order and pay |
| GET | /services | Your services · ?status= ?reference= |
| GET | /services/{id} | Service with server details |
| GET | /services/{id}/status | Live state and gauges |
| GET | /services/{id}/stats | Charts, last hour |
| GET | /services/{id}/network | IP, gateway, netmask |
| POST | /services/{id}/power | action: start, stop, reboot, shutdown |
| POST | /services/{id}/console | One-time console URL |
| POST | /services/{id}/hostname | hostname |
| POST | /services/{id}/reset-password | New root password |
| GET | /services/{id}/os | OS list for reinstall |
| POST | /services/{id}/reinstall | os_id, confirm: true |
| POST | /services/{id}/cancel | type: immediate | end_of_period, reason? |
| GET | /services/{id}/backups | Backups and plan limit |
| POST | /services/{id}/backups | name, type?, compression? |
| POST | /services/{id}/backups/restore | backup_id, confirm: true |
| DELETE | /services/{id}/backups | backup_id |
| GET | /services/{id}/emails | Emails of this service · ?latest=1 |
| GET | /emails | All account emails · ?since= ?subject= |
| GET | /emails/{id} | One email with body |
| GET | /invoices | Invoices · ?status=pending |
| GET | /invoices/{id} | Invoice with items |
| POST | /invoices/{id}/pay | Pay in full from credit |
| GET | /tickets/departments | Departments and priorities |
| GET | /tickets | Your tickets |
| POST | /tickets | subject, message, priority, department, service_id? |
| GET | /tickets/{id} | Ticket with messages |
| POST | /tickets/{id}/reply | message |
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.
Errors & limits
Every error has a stable code. Act on the code, retry only where it is safe.
{
"error": {
"code": "VALIDATION_ERROR",
"message": "The given data was invalid.",
"details": {
"checkout_config.hostname": ["The checkout config.hostname field format is invalid."]
}
}
}| HTTP | Code | Meaning |
|---|---|---|
| 400 | IDEMPOTENCY_KEY_REQUIRED | Order sent without the header |
| 401 | UNAUTHENTICATED | Key missing, wrong or deleted, or account not active |
| 402 | INSUFFICIENT_CREDIT | Top up; nothing was created |
| 403 | IP_NOT_ALLOWED · EMAIL_NOT_VERIFIED · TOS_NOT_ACCEPTED | Fix access as named |
| 404 | NOT_FOUND · NOT_AVAILABLE | Not yours / feature not in this plan |
| 409 | SERVICE_NOT_ACTIVE · NO_SERVER · NOT_CANCELLABLE · NOT_PAYABLE · BACKUP_LIMIT · IN_PROGRESS | State does not allow it yet |
| 422 | VALIDATION_ERROR · ORDER_REJECTED · IDEMPOTENCY_KEY_REUSED · INVALID_OS | Fix the request; details names fields |
| 429 | RATE_LIMITED · TOO_MANY_* · BUSY · BACKUP_IN_PROGRESS | Wait Retry-After seconds, then retry |
| 5xx | SERVER_ERROR · UPSTREAM_ERROR · ACTION_FAILED | Retry later; nothing was charged |
| Limit | Value |
|---|---|
| Requests | Per minute per account, shown on Account → API (headers X-RateLimit-*) |
| Orders | One at a time per account |
| Per server | Power 10/min · console 10/min · password reset 3/10 min · reinstall 5/hour · new backup 1/15 min |
| Tickets | 1 new ticket per 30 s · 10 replies per minute |
Support
Real people, same team that runs the servers.
| Channel | Details |
|---|---|
| Tickets | Client area at portal.kainode.com, or POST /tickets |
| support@kainode.com | |
| Phone | +1 (307) 855-1647 |
| Live chat & help | kainode.com/contact |
Include the endpoint, time, HTTP status and error code. Never include your API key: Kainode will never ask for it.
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.