Swarmz

List your plans

Enumerate the named plans defined for your platform account. Each plan carries a stable code you map to a WHMCS product and later pass to create or plan.

POSThttps://api.swarmz.net/functions/v1/platform-plans

Returns the named plans defined for your platform account. Maps to the WHMCS Console's product-mapping screen: call it with your bearer key, then map each WHMCS product to a plan code. The code is the stable handle you store and later pass as plan_code to create and plan — never the internal UUID.

Read-only. The response exposes only host-relevant columns; internal ids, timestamps, and ordering fields are not returned.

Parameters

All parameters are optional.

Prop

Type

Request

curl -X POST https://api.swarmz.net/functions/v1/platform-plans \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "active_only": true }'
const res = await fetch('https://api.swarmz.net/functions/v1/platform-plans', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer sk_live_...',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ active_only: true }),
});

const { plans } = await res.json();
import requests

res = requests.post(
    "https://api.swarmz.net/functions/v1/platform-plans",
    headers={"Authorization": "Bearer sk_live_..."},
    json={"active_only": True},
)
plans = res.json()["plans"]

Response

{
  "ok": true,
  "plans": [
    {
      "code": "pro",
      "display_name": "Pro",
      "monthly_credits": 500,
      "free_credits_per_day": 10,
      "monthly_credit_cap": null,
      "rollover_months": 1,
      "max_projects": 25,
      "max_published_projects": 25,
      "max_custom_domains": 5,
      "custom_domains_enabled": true,
      "max_compute_size": null,
      "cloud_budget_cap": null,
      "price_cents": 4900,
      "currency": "usd"
    }
  ]
}

Field meanings:

FieldMeaning
codeThe stable API handle for the plan. Pass it as plan_code to create / plan.
display_nameThe customer-facing plan name.
monthly_creditsThe monthly credit grant the plan assigns. See Credits.
free_credits_per_dayThe plan's daily free-credit allowance.
monthly_credit_capHard monthly credit ceiling (null = unlimited).
rollover_monthsHow long unused monthly credits roll over (0/1/2).
max_projects / max_published_projects / max_custom_domainsPlan caps (null = unlimited).
custom_domains_enabledWhether the plan allows custom domains.
max_compute_sizeCompute selector lock (null = unrestricted).
cloud_budget_capPer-tenant cloud spend ceiling in USD (null = unlimited).
price_cents / currencyYour display price for the plan. Informational — billing always meters to your platform account.

Plans are ordered for display. A fresh account with no plans defined returns plans: [] — that is not an error.

Plans are yours to define

There is no Swarmz plan catalog. You define your plans (names, prices, and the caps each maps to) and register them with Swarmz; this endpoint reads them back. See Entitlements for the underlying caps and Credits for the credit model.

Errors

StatuserrorreasonWhen
401unauthorizedSee Authentication
405method_not_allowedAnything other than POST
429rate_limitedper_key / per_ipRate limit hit — see Rate limits
500plans_read_failedDB messageA read failed server-side; safe to retry

Idempotency

Not applicable — listing plans is a pure read. Safe to call as often as you like. See Idempotency.

Notes

This endpoint is limited to 60 requests/min per key. See Rate limits.

On this page