Quick start
- Sign in to the client portal as the Account Owner or a Technical Admin and open API Keys.
- Enter a label (for example “Monitoring”) and create the key. Tick Also allow creating tickets (write) only if the script should open tickets.
- Copy the key straight away — it starts with
cms_and is shown only once. - Make your first request:
curl https://console.zoto.cloud/api/v1/wallet \
-H "Authorization: Bearer cms_your_key_here"
{
"balance": 995.0151,
"promoBalance": 0,
"cashBalance": 995.0151,
"amountDue": 0,
"currency": "USD",
"lowBalanceThreshold": 5
}
Authentication & scopes
Send the key in the Authorization header on every request:
Authorization: Bearer cms_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
A key always acts for the one account it was created in. There are two scopes:
| Scope | Can do | Cannot do |
|---|---|---|
| read (every key) | Read the wallet, transactions, usage, services, invoices (including PDFs) and tickets. | Change anything. |
| write (opt-in) | Everything read can, plus open support tickets (POST /tickets). | Order, terminate or change services, add credit, reply to or close tickets, manage the team, keys or webhooks. |
Ordering, terminating and paying are deliberately not available to API keys: a leaked key can never spend your money or delete your servers. Do those in the portal.
Each new key triggers a security email to the account. A key stops working the moment it is revoked on the API Keys page (the next request gets 401). The page also shows when each key was last used.
Conventions
- Base URL:
https://console.zoto.cloud/api/v1. HTTPS only; JSON in and out (Content-Type: application/jsonon requests with a body). - IDs are UUIDs (
"3e02f9ad-1b67-42bc-93ff-cb39393e7ada"). - Money is in your account currency (the
currencyfield: USD, BDT, EUR, …). Stored amounts come back as decimal strings —"4.9681"(4 decimals), hourly rates with 6 ("0.043056") — so parse them with a decimal type, not a float, when exactness matters. Computed figures (wallet balance, usage estimates) are JSON numbers. - Times are ISO 8601 in UTC (
"2026-10-19T07:34:08.209Z"); billing periods are plain dates ("2026-10-01"). - Lists are newest first and not paginated; the wallet ledger returns its 60 most recent entries.
- New fields may be added to any response; ignore the ones you don’t know.
Errors & rate limits
Errors use standard HTTP status codes and a JSON body:
{ "statusCode": 403, "error": "Forbidden", "message": "Insufficient role for this action" }
| Status | Meaning |
|---|---|
400 | The request body is invalid. message may be a list of field errors. |
401 | Missing, wrong or revoked key: "Invalid or revoked API key". |
403 | The key’s scope doesn’t allow this (e.g. a read key on POST /tickets). |
404 | Not found — or it belongs to another account. |
429 | Rate limit reached; wait and retry. |
5xx | A problem on our side; retry with backoff. |
Rate limit: 300 requests per minute per key. Every response carries X-RateLimit-Limit and X-RateLimit-Remaining; after a 429, honour Retry-After if present, otherwise wait a minute.
Wallet
Current balance. cashBalance is paid-in money, promoBalance promotional credit (non-refundable); balance is both. amountDue is above zero only when usage has pushed the balance below zero.
{
"balance": 995.0151,
"promoBalance": 0,
"cashBalance": 995.0151,
"amountDue": 0,
"currency": "USD",
"lowBalanceThreshold": 5
}
The 60 most recent wallet entries: top-ups (positive), usage and fees (negative), refunds and adjustments. Usage of each service is grouped into one entry per UTC day (its id starts with rollup:; hourly DDoS Protection and Daily Backup usage get their own entries, with :ddos_addon_usage or :backup_addon_usage at the end of the id). A grouped entry carries the time and balanceAfter of its latest charge, plus periodStart and periodEnd (its first and last charge); when it holds more than one charge, its description ends in “N hourly charges” (or “N usage charges” for services on the older per-minute meter). balanceAfter is the balance right after that entry.
[
{
"id": "rollup:f87460ae-abbb-4e46-b0ed-1d45e303ae86:1794182400000",
"type": "deduction", // topup | deduction | refund | adjustment | affiliate_commission | affiliate_clawback
"currency": "USD",
"amount": "-0.2381",
"balanceAfter": "994.7619",
"promoAmount": "0.0000",
"subscriptionId": "f87460ae-abbb-4e46-b0ed-1d45e303ae86",
"description": "instance-platform usage: 8 hourly charges",
"metadata": { "billingModel": "vultr_hourly", "hoursElapsed": 1, "rate": 0.029762, "netAmount": 0.0298, "taxAmount": 0 },
"createdAt": "2026-11-09T13:03:00.000Z",
"periodStart": "2026-11-09T06:03:00.000Z",
"periodEnd": "2026-11-09T13:03:00.000Z"
}
]
For usage rows, metadata.type tells charges apart: absent for the service’s own usage; ddos_addon_usage or backup_addon_usage for hourly add-on usage; otherwise setup_fee, monthly_base_fee, ddos_addon_fee, backup_addon_fee (add-on cycles charged in advance, older services only), snapshot_storage_fee or late_fee. On a grouped entry, metadata is that of its latest charge.
Usage
This calendar month so far, and a projection to month end, overall and per service.
{
"currency": "USD",
"periodStart": "2026-10-01T00:00:00.000Z",
"periodEnd": "2026-11-01T00:00:00.000Z",
"lastMeterUpdate": "2026-10-19T07:00:00.000Z",
"billedSoFar": 4.9849,
"unbilledEstimate": 0,
"estimateNet": 4.9849,
"estimateTax": 0,
"estimateGross": 4.9849,
"projectedMonthEnd": 5.6176,
"taxRatePercent": 0,
"taxInclusive": false,
"subscriptions": [
{
"id": "189019da-e612-488e-94f4-39d6d1b8d3fd",
"moduleKey": "zoto-s3-storage",
"status": "active",
"hourlyRate": 0.002083,
"billedThisPeriod": 0.5061,
"unbilledEstimate": 0,
"lastBilledAt": "2026-10-19T07:00:00.000Z"
}
]
}
The ledger entries of the current month only — same shape as /wallet/transactions, except that usage is grouped per UTC hour instead of per day.
Services
Every service on the account (servers, applications, WordPress, Odoo, RDP, VPN, object storage).
[
{
"id": "f87460ae-abbb-4e46-b0ed-1d45e303ae86",
"label": "My Blog Server", // your own name for it, or null
"productLabel": "Cloud Compute Intel: 2 vCPU / 2GB",
"serviceCategory": "Zoto RDP",
"modelNumber": "HQ-GC-2C2G-3",
"moduleKey": "zoto-rdp",
"status": "active",
"suspendReason": null,
"currency": "USD",
"hourlyRate": "0.044643",
"billingModel": "vultr_hourly",
"usageMonthlyPrice": "30.0000",
"hourDivisor": 672,
"capHours": 672,
"capMonth": "2026-11",
"capSecondsBilled": 846000,
"billingCycle": "monthly",
"ddosAddonEnabled": false,
"ddosAddonMonthlyFee": "0.0000",
"backupAddonEnabled": true,
"backupAddonMonthlyFee": "2.8000",
"config": { "regionId": "jnb", "osId": 501 },
"activatedAt": "2026-10-08T13:12:00.000Z",
"lastBilledAt": "2026-10-19T07:00:00.000Z",
"scheduledTerminationAt": null,
"createdAt": "2026-10-08T13:10:41.000Z"
}
]
| Field | Values |
|---|---|
status | pending (being created), pending_approval (held for review), active, suspended, terminated, failed |
suspendReason | non_payment, admin, client, or null |
moduleKey | instance-platform (Zoto Instances), haiq-apps (Zoto Applications), zoto-rdp, wordpress-saas, odoo-saas, zoto-vpn, zoto-s3-storage |
billingCycle | monthly or yearly — for base fees (and, on legacy services, add-on fees); usage is always hourly |
billingModel | vultr_hourly — servers, applications, WordPress, Odoo, RDP and VPN: billed per whole hour (1-hour minimum) at usageMonthlyPrice ÷ hourDivisor (672, or 730 for VX1 plans), add-ons hourly from their monthly fees (ddosAddonMonthlyFee, backupAddonMonthlyFee) with nothing charged up front. legacy — Object Storage, and older services until their next renewal date. |
capHours, capMonth, capSecondsBilled | The monthly cap: at most capHours billed hours per calendar month (UTC), so a month never costs more than the monthly prices before tax; null = no cap (VX1 plans, legacy). capSecondsBilled is the time billed so far in capMonth ("YYYY-MM"); a different month means nothing billed yet this month. |
One service, same fields as above.
Invoices
Two kinds: usage_statement — the monthly statement of usage already paid from the wallet — and topup_receipt for each wallet top-up.
{
"id": "0a7f42c1-5328-4eb5-8676-d791a2900147",
"invoiceNumber": "ZC-2026-0005003",
"kind": "usage_statement",
"paymentTransactionId": null,
"periodStart": "2026-10-01",
"periodEnd": "2026-11-01",
"currency": "USD",
"subtotal": "4.9681",
"tax": "0.0000",
"total": "4.9681",
"billToName": "Zoto Tester",
"billToCompany": "Acme Ltd",
"createdAt": "2026-11-01T00:10:00.000Z",
"lines": [
{
"description": "My Blog Server",
"detail": "High Frequency Intel: 1 vCPU / 1GB · blog · 067e656d-…",
"chargeType": "usage",
"serviceCategory": "Zoto Instances",
"subscriptionId": "067e656d-bd42-47d5-b793-5b227d3e5595",
"usageStart": "2026-10-01T00:00:00.000Z",
"usageEnd": "2026-10-31T23:00:00.000Z",
"hoursUsed": "744.0000",
"rate": "0.011000",
"subtotal": "8.1840",
"tax": "0.0000",
"position": 0
}
]
}
chargeType on statement lines: usage, monthly_base_fee, setup_fee, ddos_addon_fee, backup_addon_fee, snapshot_storage_fee, time_entry, refund, other — null on statements issued before October 2026 and on receipts. Hourly DDoS Protection and Daily Backup usage appear as ddos_addon_fee and backup_addon_fee lines. Sort lines by position.
invoiceNumber is the prefix, the year and a 7-digit number (ZC-2026-0005003); invoices issued before November 2026 keep their 6-digit numbers (ZC-2026-000003). On a topup_receipt, paymentTransactionId is the payment’s transaction ID (Moneybag txn_…, SSLCommerz bank transaction id, PayPal capture id, Stripe payment intent id, or your own reference for a manual payment); it is null when there is none and on statements.
The invoice as a PDF (Content-Type: application/pdf).
curl -o ZC-2026-0005003.pdf https://console.zoto.cloud/api/v1/invoices/0a7f42c1-5328-4eb5-8676-d791a2900147/pdf \
-H "Authorization: Bearer $ZOTO_API_KEY"
Support tickets
Your tickets, and one ticket with its conversation (messages). status is open, answered (we replied), client_reply (you replied) or closed.
[ { "id": "5b1c…", "name": "Technical Support", "slug": "technical", "description": "A service is down, slow …" } ]
Open a ticket — for example from your monitoring when a server stops answering. The ticket shows API as its author.
| Field | Required | Notes |
|---|---|---|
subject | yes | Up to 200 characters. |
body | yes | Up to 20 000 characters. |
priority | no | low, normal (default), high, urgent |
departmentId | no | From /tickets/departments. |
subscriptionId | no | The service this is about. |
curl -X POST https://console.zoto.cloud/api/v1/tickets \
-H "Authorization: Bearer $ZOTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subject": "web-01 not responding",
"body": "Health check failed 3 times since 07:40 UTC.",
"priority": "high",
"subscriptionId": "f87460ae-abbb-4e46-b0ed-1d45e303ae86"
}'
Returns the new ticket (same shape as GET /tickets/{id}) and fires the ticket.created webhook. Replying and closing are done in the portal.
Catalog (public)
These need no key — they are what the order page shows.
Every plan on sale, with monthlyPriceUsd, hourlyRateUsd, add-on prices (ddosAddonPriceUsd, backupAddonPriceUsd), setupFeeUsd, serviceCategory and, for servers, the regions it is sold in (locations). Prices are in USD before tax; your account is billed in its own currency.
Exchange rates from USD (fxRates) and the tax rate applied to orders.
Regions for a platform: [{ "id": "ams", "city": "Amsterdam", "country": "NL" }, …].
Webhooks
Webhooks push events to your server so you don’t have to poll. Add an endpoint on the portal’s Webhooks page (Account Owner or Technical Admin), choose its events and keep the signing secret it shows. The endpoint must be a public http or https URL (not localhost or a private address); use https so the payload is encrypted in transit.
Every delivery is a POST with a JSON body:
POST /your/webhook/path
Content-Type: application/json
X-Webhook-Event-Id: 6f1d0c3a-5a1e-4a3c-9a8e-1b2c3d4e5f60
X-Webhook-Timestamp: 1792396800
X-Webhook-Signature: 5f2b7c…(64 hex characters)
{
"event_id": "6f1d0c3a-5a1e-4a3c-9a8e-1b2c3d4e5f60",
"event_type": "service.suspended",
"created_at": "2026-10-19T08:00:00.000Z",
"data": {
"service_id": "f87460ae-abbb-4e46-b0ed-1d45e303ae86",
"reason": "non_payment",
"effective_at": "2026-10-19T08:00:00.000Z"
}
}
Events
| Event | When | data |
|---|---|---|
service.activated | A new service is ready. | service_id, client_id, provider_id, effective_at |
service.suspended | A service is suspended. | service_id, reason (non_payment | admin | client), effective_at |
service.terminated | A service is terminated (by you, us, or after a long suspension). | service_id, reason, effective_at |
resource.state_changed | Any status change of a service, including pending → failed and suspended → active. | resource_id, old_state, new_state, observed_at |
invoice.posted | A monthly statement or a top-up receipt is issued. | invoice_id, total, currency, due_date (always null: statements are already paid) |
payment.succeeded | A wallet top-up is confirmed. | transaction_id, invoice_id, amount, currency |
payment.failed | A top-up is declined or rejected. | transaction_id, reason_code |
ticket.created | A support ticket is opened on the account. | ticket_id, client_id, department_id |
Verifying signatures
X-Webhook-Signature is the hex HMAC-SHA256 of <X-Webhook-Timestamp>.<raw request body>, keyed with your endpoint’s signing secret. To accept a delivery:
- Read the raw body bytes, before any JSON parsing (re-serialized JSON won’t match).
- Compute the HMAC over
timestamp + "." + bodyand compare it to the header with a constant-time comparison. - Reject timestamps more than 5 minutes from your clock, to stop replays.
- Use
event_idto ignore duplicates — a retried delivery keeps the same id.
Node.js (Express)
const crypto = require("crypto");
const express = require("express");
const app = express();
const SECRET = process.env.ZOTO_WEBHOOK_SECRET;
app.post("/webhooks/zotocloud", express.raw({ type: "application/json" }), (req, res) => {
const ts = req.get("X-Webhook-Timestamp") || "";
const sig = req.get("X-Webhook-Signature") || "";
const expected = crypto.createHmac("sha256", SECRET)
.update(`${ts}.${req.body.toString("utf8")}`)
.digest("hex");
const fresh = Math.abs(Date.now() / 1000 - Number(ts)) < 300;
const valid = sig.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected));
if (!fresh || !valid) return res.status(401).end();
const event = JSON.parse(req.body.toString("utf8"));
// handle event.event_type / event.data, de-duplicated by event.event_id
res.status(200).end();
});
Python (Flask)
import hashlib, hmac, json, os, time
from flask import Flask, request, abort
app = Flask(__name__)
SECRET = os.environ["ZOTO_WEBHOOK_SECRET"].encode()
@app.post("/webhooks/zotocloud")
def zotocloud_webhook():
ts = request.headers.get("X-Webhook-Timestamp", "")
sig = request.headers.get("X-Webhook-Signature", "")
body = request.get_data() # raw bytes
expected = hmac.new(SECRET, ts.encode() + b"." + body, hashlib.sha256).hexdigest()
if not ts.isdigit() or abs(time.time() - int(ts)) > 300 or not hmac.compare_digest(sig, expected):
abort(401)
event = json.loads(body)
# handle event["event_type"] / event["data"], de-duplicated by event["event_id"]
return "", 200
PHP
<?php
$secret = getenv('ZOTO_WEBHOOK_SECRET');
$ts = $_SERVER['HTTP_X_WEBHOOK_TIMESTAMP'] ?? '';
$sig = $_SERVER['HTTP_X_WEBHOOK_SIGNATURE'] ?? '';
$body = file_get_contents('php://input'); // raw body
$expected = hash_hmac('sha256', $ts . '.' . $body, $secret);
if (!ctype_digit($ts) || abs(time() - (int) $ts) > 300 || !hash_equals($expected, $sig)) {
http_response_code(401);
exit;
}
$event = json_decode($body, true);
// handle $event['event_type'] / $event['data'], de-duplicated by $event['event_id']
http_response_code(200);
Delivery & retries
- Reply with any
2xxwithin 10 seconds to acknowledge. Do slow work after responding. - Anything else — another status, a timeout, a redirect (redirects are not followed) — counts as a failure and is retried every 5 minutes, up to 5 attempts in total.
- Each endpoint’s Deliveries list in the portal shows every attempt and the status your server returned.
- Events can arrive more than once and not strictly in order; use
event_idand the timestamps indata.
Security notes
- Treat API keys and webhook secrets like passwords: keep them in environment variables or a secrets manager, never in code or a public repository.
- Give each script its own key with the smallest scope it needs, so one can be revoked without breaking the others.
- Revoke a key you think was exposed at once (API Keys page) — it stops working immediately.
- Questions or problems? Open a ticket in the portal or write to [email protected].