ZotoCloud

ZotoCloud API

Read your account’s wallet, usage, services and invoices from your own scripts, open support tickets automatically, and receive signed webhooks when something changes.

https://console.zoto.cloud/api/v1

Quick start

  1. Sign in to the client portal as the Account Owner or a Technical Admin and open API Keys.
  2. Enter a label (for example “Monitoring”) and create the key. Tick Also allow creating tickets (write) only if the script should open tickets.
  3. Copy the key straight away — it starts with cms_ and is shown only once.
  4. 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:

ScopeCan doCannot 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/json on requests with a body).
  • IDs are UUIDs ("3e02f9ad-1b67-42bc-93ff-cb39393e7ada").
  • Money is in your account currency (the currency field: 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" }
StatusMeaning
400The request body is invalid. message may be a list of field errors.
401Missing, wrong or revoked key: "Invalid or revoked API key".
403The key’s scope doesn’t allow this (e.g. a read key on POST /tickets).
404Not found — or it belongs to another account.
429Rate limit reached; wait and retry.
5xxA 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

GET/walletread

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
}
GET/wallet/transactionsread

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

GET/usage/current-spendread

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"
    }
  ]
}
GET/usage/period-transactionsread

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

GET/subscriptionsread

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"
  }
]
FieldValues
statuspending (being created), pending_approval (held for review), active, suspended, terminated, failed
suspendReasonnon_payment, admin, client, or null
moduleKeyinstance-platform (Zoto Instances), haiq-apps (Zoto Applications), zoto-rdp, wordpress-saas, odoo-saas, zoto-vpn, zoto-s3-storage
billingCyclemonthly or yearly — for base fees (and, on legacy services, add-on fees); usage is always hourly
billingModelvultr_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, capSecondsBilledThe 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.
GET/subscriptions/{id}read

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.

GET/invoicesread
GET/invoices/{id}read
{
  "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.

GET/invoices/{id}/pdfread

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

GET/ticketsread
GET/tickets/{id}read

Your tickets, and one ticket with its conversation (messages). status is open, answered (we replied), client_reply (you replied) or closed.

GET/tickets/departmentsread
[ { "id": "5b1c…", "name": "Technical Support", "slug": "technical", "description": "A service is down, slow …" } ]
POST/ticketswrite

Open a ticket — for example from your monitoring when a server stops answering. The ticket shows API as its author.

FieldRequiredNotes
subjectyesUp to 200 characters.
bodyyesUp to 20 000 characters.
prioritynolow, normal (default), high, urgent
departmentIdnoFrom /tickets/departments.
subscriptionIdnoThe 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.

GET/catalog/products

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.

GET/catalog/currency-info

Exchange rates from USD (fxRates) and the tax rate applied to orders.

GET/catalog/regions?moduleKey=instance-platform

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

EventWhendata
service.activatedA new service is ready.service_id, client_id, provider_id, effective_at
service.suspendedA service is suspended.service_id, reason (non_payment | admin | client), effective_at
service.terminatedA service is terminated (by you, us, or after a long suspension).service_id, reason, effective_at
resource.state_changedAny status change of a service, including pending → failed and suspended → active.resource_id, old_state, new_state, observed_at
invoice.postedA monthly statement or a top-up receipt is issued.invoice_id, total, currency, due_date (always null: statements are already paid)
payment.succeededA wallet top-up is confirmed.transaction_id, invoice_id, amount, currency
payment.failedA top-up is declined or rejected.transaction_id, reason_code
ticket.createdA 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:

  1. Read the raw body bytes, before any JSON parsing (re-serialized JSON won’t match).
  2. Compute the HMAC over timestamp + "." + body and compare it to the header with a constant-time comparison.
  3. Reject timestamps more than 5 minutes from your clock, to stop replays.
  4. Use event_id to 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 2xx within 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_id and the timestamps in data.

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].