Developers · Ping Cloud

Ping Cloud API guide

Sell and run Ping Cloud servers from your own platform. Your system calls our API with a key; we run the servers in Nairobi and charge your prepaid wallet in KES at standard Ping Cloud prices. You set your own price to your customers.

Base URL
https://cloud.ping.africa/api/v1
Authentication
Authorization: Bearer pc_live_…
Version
1.0 (19 November 2026)

For your marketplace

Why Ping Cloud

Nairobi data centre

Servers run in Nairobi, Kenya, so your customers’ data stays in the region.

Low latency in East Africa

Short network paths to users in Kenya and the region, compared with servers in Europe or the US.

Priced in KES

Plain monthly prices in Kenyan shillings. Top up with M-Pesa or card.

Monthly prepaid plans

Each server is paid a month ahead from your wallet. No surprise bills, no credit to manage.

People you can reach

support@ping.africa · +254 725 615 615 · Monday to Friday, 9:00 to 18:00 EAT.

Overview

How it fits together

Three one-time steps in the Ping Cloud dashboard, then everything else through the API. The numbers match the step cards below.

  1. 1Open a Ping Cloud account
  2. 2Top up the wallet
  3. 3Create an API key
  4. 4List locations and plans
  5. 5Create a server
  6. 6Wait for RUNNING
  7. 7Manage: start, stop, restart
  8. 8Stop
  9. 9Delete
In the dashboard, once Through the API, as often as you need

Reselling

Partner quick start

1

Your customer orders

on your site, at your price

2

You call POST /vms

with your key, for the plan they chose

3

We charge your wallet

the standard Ping Cloud price, a month ahead

4

You bill your customer

your price, your margin, your invoice

Wallet rules

  • Prepaid. A server's first month is charged from your wallet when you order it. After that month, running servers are billed hourly from the wallet.
  • Refused when short. If the wallet cannot pay the full first month, or anything is owed, the order is refused with 402 and nothing is created. There is no credit or overdraft through the API.
  • Refunds. If a server cannot be created after the charge, the full amount goes back to the wallet straight away. When you delete a server, the unused part of its month goes back too.
  • Top-ups happen in the dashboard (M-Pesa or card). Keep enough balance: when the wallet runs out, servers are suspended after a short grace period.
  • Check before you sell: read wallet.available from the usage summary before you accept an order.

Step by step

From account to delete

Each step shows what it does, the request, a real response from our live test (identifiers kept, addresses and passwords masked) and what to check next.

1

Open a Ping Cloud account

In the dashboard

What it does

Sign up at cloud.ping.africa with your company name. Your account gets one organization; every server, key and wallet line belongs to it. Invite colleagues from the dashboard if more people need access.

Check next

You can open the dashboard and see your organization name at the top left.

2

Top up the wallet

In the dashboard

What it does

Open Billing and add credit with M-Pesa or card. Orders are paid from this wallet. The API reads the balance; it cannot add money.

Check next

The balance in the top bar shows the amount you added.

3

Create an API key and test it

In the dashboard

What it does

Go to Settings → API Keys → Create API Key. Copy the key straight away: it starts with pc_live_ and is shown once. It acts only for your organization, with your role. Keep it on your servers, never in a browser or mobile app. You can revoke it on the same page at any time.

Request
export KEY="pc_live_your-key"
export API="https://cloud.ping.africa/api/v1"

curl $API/me -H "Authorization: Bearer $KEY"
Response
{
  "success": true,
  "data": {
    "authenticatedWith": "api_key",
    "apiKey": {
      "name": "billing system", "prefix": "pc_live_AxwA",
      "rateLimitPerMinute": 120
    },
    "organizations": [
      { "id": "cmwnuotnz0002g0fvrqszuw37",
        "name": "Your Company", "role": "OWNER" }
    ]
  }
}

Check next

authenticatedWith is api_key. Save organizations[0].id as ORG: it is the orgId in the calls below (export ORG=cmwnuotnz…).

4

List locations, images and plans

API call

What it does

Read what you can sell: the location, the operating systems and the plans with their monthly prices.

Request
curl $API/regions -H "Authorization: Bearer $KEY"
curl "$API/templates?purpose=os" -H "Authorization: Bearer $KEY"
curl $API/pricing/public -H "Authorization: Bearer $KEY"
Responses
// GET /regions
{ "data": [
  { "id": "nairobi", "displayName": "NAIROBI",
    "location": "Nairobi, Kenya" }
] }

// GET /templates?purpose=os  (trimmed)
{ "data": [
  { "templateId": 8001, "name": "ubuntu-2404-template",
    "osType": "ubuntu" }, …
] }

// GET /pricing/public  (trimmed)
{ "data": {
  "shared": [
    { "id": "clp_sh_565ffab9e7d85a12aad0",
      "vcpu": 1, "ram": "1 GB", "storage": "20 GB", "price": 500 }, …
  ],
  "dedicated": [ … ],
  "customRates": {
    "cpuPerCore": 200, "memoryPerGB": 100, "storagePerGB": 10,
    "baseVM": 100, "currency": "KES" }
} }

Check next

Pick a plan id and an image templateId (8001 is Ubuntu 24.04). To order a plan, send its vcpu as cores, its ram in MB as memory (1 GB = 1024) and its storage in GB as disk.

5

Create a server

API call

What it does

Orders the server and pays its first month from your wallet at once. If the wallet cannot pay in full, nothing is created and you get 402. The login password is returned only in this response.

Request
curl -X POST $API/vms \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "orgId": "'"$ORG"'",
    "name": "web-1",
    "planId": "clp_sh_565ffab9e7d85a12aad0",
    "templateId": 8001,
    "cores": 1, "memory": 1024, "disk": 20,
    "cloudInit": {
      "hostname": "web-1", "username": "ubuntu",
      "sshKeys": "ssh-ed25519 AAAA… you@laptop"
    }
  }'
Response
HTTP 201
{
  "success": true,
  "data": {
    "id": "cmwnupjro00b9g0xtgldq2pcz",
    "vmid": 616913,
    "name": "web-1",
    "ipAddress": "102.x.x.x",
    "credentials": {
      "username": "ubuntu", "password": "••••••••",
      "sshCommand": "ssh ubuntu@102.x.x.x", "accessPort": 22
    },
    "message": "Server creation started! …"
  }
}

Check next

Store id (export VM=cmwnupjro…) and the credentials. The wallet shows a charge "Server deployment: web-1 (1 month prepaid)".

6

Wait until it is RUNNING

API call

What it does

A new server is PROVISIONING for one to three minutes. Poll it every 10 seconds until it is RUNNING.

Request
curl $API/vms/$VM -H "Authorization: Bearer $KEY"
Response
{
  "data": {
    "id": "cmwnupjro00b9g0xtgldq2pcz",
    "name": "web-1", "status": "RUNNING", "regionId": "nairobi",
    "cores": 1, "memory": 1024, "disk": 20, "ipAddress": "102.x.x.x",
    "pricingMode": "TEMPLATE_FIXED", "monthlyPrice": "500",
    "prepaidAmount": "500", "prepaidUntil": "2026-12-18T21:00:00.000Z"
  }
}

Check next

status is RUNNING. Hand the IP and credentials to your customer. prepaidAmount is what this server cost at order; prepaidUntil is when that month ends.

7

Start, stop, restart

API call

What it does

Runs the action on the server. It answers at once and the server changes state within a few seconds.

Request
curl -X POST $API/vms/$VM/actions \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{ "action": "restart" }'   # or "start", "stop"
Response
{ "success": true, "data": {},
  "message": "Server restart initiated successfully" }

Check next

GET /vms/{id}/status shows the live state (running, stopped), uptime and usage.

8

Read usage, charges and the wallet

API call

What it does

One call for this month: the wallet balance, what was charged and added, and usage per server.

Request
curl "$API/organizations/$ORG/usage/summary?month=2026-11" \
  -H "Authorization: Bearer $KEY"
Response
{
  "data": {
    "period": { "start": "2026-11-01", "end": "2026-11-30" },
    "currency": "KES",
    "wallet": { "balance": 499.31, "reserved": 0,
                "available": 499.31 },
    "totals": { "drawnFromWallet": 500, "addedToWallet": 999.31,
                "meteredUsage": 0 },
    "charges": [
      { "type": "USAGE_DEDUCTION", "amount": 500,
        "description": "Server deployment: web-1 (1 month prepaid)" }
    ],
    "topUps": [
      { "type": "REFUND", "amount": 499.31,
        "description": "Server \"web-1\" credit note refund
                        (1h of 720h used)" }, …
    ]
  }
}

Check next

Use wallet.available before you accept an order on your side. Also available: …/credits/balance, …/credits/transactions, …/invoices.

9

Stop, then delete

API call

What it does

A server must be stopped before it can be deleted. Stop it, wait until GET /vms/{id} shows STOPPED (usually within 30 seconds), then delete. Deleting cannot be undone. The unused part of the month goes back to your wallet.

Request
curl -X POST $API/vms/$VM/actions \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" -d '{ "action": "stop" }'

# when status is STOPPED:
curl -X DELETE $API/vms/$VM -H "Authorization: Bearer $KEY"
Response
{ "success": true,
  "data": { "vmId": "cmwnupjro00b9g0xtgldq2pcz" },
  "message": "VM deleted successfully" }

Check next

GET /vms/{id} now answers 404. The wallet shows a REFUND line for the unused time.

When something goes wrong

Errors and fixes

Errors come back as { "success": false, "error": { "code", "message" } } with the HTTP status below.

StatusMeansFix
400Request not valid, or VM must be stopped before deletionRead error.details.issues. For delete: stop the server, wait for STOPPED, try again.
401Key missing, wrong or revoked, or an endpoint that does not take keysSend Authorization: Bearer pc_live_…; create a new key in the dashboard if it was revoked.
402Wallet cannot pay the first month, or something is owedTop up in the dashboard, then order again. Nothing was created or charged.
403Outside your organization, or your role does not allow itUse the orgId from GET /me. Ask an owner to create the key if your role is limited.
404Not found, or not in your organizationCheck the id; deleted servers answer 404.
429Too many requests for this keyWait the seconds in Retry-After, then continue.

Good to know

Rate limits and keys

  • 120 requests a minute per key. Every response has X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Need more? Write to support.
  • One organization per key. A key cannot see or touch anything outside the organization it was created in.
  • Revoke any time in Settings → API Keys; the key stops working at once.

Copy and run

Complete example

The whole lifecycle in one script. It needs curl and jq, and orders a KES 500 server, so run it with money in the wallet.

bash
KEY="pc_live_your-key-here"
API="https://cloud.ping.africa/api/v1"
H="Authorization: Bearer $KEY"
J="Content-Type: application/json"

# 1. Your organization and wallet
ORG=$(curl -s $API/me -H "$H" | jq -r '.data.organizations[0].id')
curl -s "$API/organizations/$ORG/usage/summary" -H "$H" | jq '.data.wallet'

# 2. Smallest shared plan (1 vCPU, 1 GB, 20 GB) and Ubuntu 24.04
PLAN=$(curl -s $API/pricing/public -H "$H" \
  | jq -r '.data.shared | min_by(.price) | .id')

# 3. Create, then wait until RUNNING
BODY=$(jq -n --arg org "$ORG" --arg plan "$PLAN" '{
  orgId: $org, name: "web-1", planId: $plan, templateId: 8001,
  cores: 1, memory: 1024, disk: 20,
  cloudInit: { hostname: "web-1", username: "ubuntu" } }')
VM=$(curl -s -X POST $API/vms -H "$H" -H "$J" -d "$BODY" | jq -r .data.id)
status() { curl -s $API/vms/$VM -H "$H" | jq -r .data.status; }
until [ "$(status)" = "RUNNING" ]; do sleep 10; done

# 4. Restart
curl -s -X POST $API/vms/$VM/actions -H "$H" -H "$J" \
  -d '{"action":"restart"}'

# 5. What it cost
curl -s $API/vms/$VM -H "$H" \
  | jq '.data | {status, prepaidAmount, prepaidUntil, monthlyPrice}'

# 6. Stop, wait until STOPPED, delete
curl -s -X POST $API/vms/$VM/actions -H "$H" -H "$J" -d '{"action":"stop"}'
until [ "$(status)" = "STOPPED" ]; do sleep 5; done
curl -s -X DELETE $API/vms/$VM -H "$H"

For your catalogue

Listing kit

Text and prices you can use in your marketplace listing. Prices are what we charge you; add your margin.

Product description

Ping Cloud servers, Nairobi. Linux and Windows virtual servers hosted in Nairobi, Kenya, for fast access across East Africa. Choose a size, get a public IP and SSH or RDP access in minutes. Monthly plans with fixed prices in KES.

Plans (monthly, KES)

SharedMemoryStorage (NVMe)Price
1 vCPU1 GB20 GBKES 500
1 vCPU2 GB30 GBKES 1,000
2 vCPU4 GB60 GBKES 1,500
3 vCPU8 GB120 GBKES 3,000
4 vCPU16 GB200 GBKES 5,500
6 vCPU24 GB300 GBKES 8,000
DedicatedMemoryStorage (NVMe)Price
4 vCPU16 GB200 GBKES 5,500
6 vCPU32 GB400 GBKES 8,000
8 vCPU48 GB600 GBKES 11,000
10 vCPU64 GB800 GBKES 14,000

From GET /pricing/public on 19 November 2026; read it from the API for current prices. Windows Server 2022 is available at KES 3,000 a month (2 vCPU, 4 GB, 64 GB).

Logo

Ping Africa logo

Download PNG · Use as supplied, on a light background.

All endpoints

Endpoint reference

Relative to https://cloud.ping.africa/api/v1. Every endpoint takes an API key. Machine-readable: OpenAPI JSON.

Account

  • GET/meWho the key acts for

Catalog

  • GET/regionsLocations
  • GET/templates?purpose=osOperating system images
  • GET/pricing/publicPlans and prices
  • GET/kubernetes/pricingKubernetes tiers and prices

Servers

  • GET/vms?orgId=…List servers
  • POST/vmsCreate a server
  • GET/vms/{id}Get a server
  • GET/vms/{id}/statusLive state
  • POST/vms/{id}/actionsStart, stop, restart
  • DELETE/vms/{id}Delete (stopped servers only)

Billing (read-only)

  • GET/organizations/{orgId}/usage/summaryMonth: wallet, charges, top-ups, usage
  • GET/organizations/{orgId}/credits/balanceWallet balance
  • GET/organizations/{orgId}/credits/transactionsWallet lines
  • GET/organizations/{orgId}/invoicesInvoices

Help

Support

Email support@ping.africa or call +254 725 615 615, Monday to Friday, 9:00 to 18:00 EAT. Include your organization id and the time of the request.