Developers

API reference

A small REST API for automating your account: balance, plans, usage and buying from your wallet.

Authentication

Create a key on Access & API and send it as a bearer token. Keys act as your account, so keep them on your server, never in a browser or app.

Authorization: Bearer zp_live_…
Base URL: https://zenproxy.io/api/v1
GET /api/v1/me

Your account

Email, name and wallet balance.

Request
curl https://zenproxy.io/api/v1/me \
  -H "Authorization: Bearer $ZENPROXY_KEY"
Response
{
  "email": "you@company.com",
  "wallet": { "balanceCents": 4250, "currency": "USD" }
}
GET /api/v1/catalog

Plans and prices

Everything you can buy. Filter with ?product=residential (Lite), residential-premium, datacenter, isp (Shared ISP), isp-private (Private ISP), residential-unlimited, datacenter-rotating, ipv6 or mobile. Plans with perIp: true are priced for one IP; their ipTiers give the price per IP by order size (min, max, unitCents), and the whole order is charged at its tier. Plans with oncePerAccount: true can be bought once per account.

Request
curl "https://zenproxy.io/api/v1/catalog?product=residential" \
  -H "Authorization: Bearer $ZENPROXY_KEY"
Response
{
  "plans": [
    { "id": "65247e02-…", "product": "residential", "priceCents": 750,
      "dataGb": 10, "days": 30, "customGb": true }
  ]
}
GET /api/v1/subscriptions

Your plans and usage

Every plan you own with data used, data total and expiry.

Request
curl https://zenproxy.io/api/v1/subscriptions \
  -H "Authorization: Bearer $ZENPROXY_KEY"
Response
{
  "subscriptions": [
    { "planId": "0f6c2a8e-…", "status": "active", "usedGb": 8.4,
      "totalGb": 10, "expiresAt": "2026-11-09T00:00:00.000Z" }
  ]
}
POST /api/v1/orders

Buy a plan

Buys from your wallet. Send customGb for any residential amount, quantity for the number of IPs on a Private ISP plan (perIp), and promoCode to apply a discount. Returns 402 with shortfallCents if the wallet is short. Send an Idempotency-Key header so a retried request never buys twice.

Request
curl -X POST https://zenproxy.io/api/v1/orders \
  -H "Authorization: Bearer $ZENPROXY_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-1042" \
  -d '{"planId":"65247e02-…","customGb":25}'
Response
{ "ok": true, "planId": "0f6c2a8e-…", "chargedCents": 1875,
  "reference": "…" }

Errors and limits

401Missing, invalid or revoked key
402Wallet balance too low (error insufficient_funds, see shortfallCents)
403Account suspended
409error trial_already_used: this plan can be bought once per account, and it already was. error order_already_placed: an order with the same Idempotency-Key went through already; nothing new was charged. error order_confirming: your wallet was charged and the order is still being set up; do not retry, it appears in /subscriptions shortly or is refunded. error plan_unavailable: not enough IPs in stock for this order right now; no charge was made, try a smaller order or later
429More than 120 requests a minute
503Sales are paused for maintenance (error sales_paused), or the order could not be set up (error setup_failed; the charge was refunded to your wallet straight away, safe to retry), or this product is briefly unavailable (error plan_unavailable; no charge was made, try again in a few minutes)
500The order could not be set up and the automatic refund did not go through (error setup_failed, refunded: false; do not retry, contact support with the reference)

Errors return JSON with a readable message. Errors from an order or a request body also carry an error code; the key checks (401, 403 and the 429 request limit) return only the message.

Retrying an order safely: send an Idempotency-Key header (any 1 to 200 visible characters, one per order) with POST /orders. The same key again within 24 hours is never charged twice: it answers 409 with error order_already_placed.