Unsuspend a tenant
Reverse a suspend — flip the tenant back to active and replay its captured state, republishing projects, rebinding domains, and resuming managed cloud.
https://api.swarmz.net/functions/v1/platform-unsuspendReverses a suspend. Maps to WHMCS UnsuspendAccount. The order mirrors suspend: client_status is flipped back to active first, so the publish-site and connect-custom-domain calls (which honor client_status) accept the restore requests. Then unsuspendWorkspace replays the captured suspension_state — previously-published projects are republished, custom domains are rebound, and managed cloud is resumed.
Address the tenant by tenant_id — the id returned by create — or fall back to your external_ref. Supply exactly one identifier.
Parameters
Prop
Type
Request
curl -X POST https://api.swarmz.net/functions/v1/platform-unsuspend \
-H "Authorization: Bearer sk_live_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6" \
-H "Content-Type: application/json" \
-d '{ "tenant_id": "aa7d7fae-0386-4d8a-b977-72f856eac242" }'const res = await fetch('https://api.swarmz.net/functions/v1/platform-unsuspend', {
method: 'POST',
headers: {
Authorization: 'Bearer sk_live_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6',
'Content-Type': 'application/json',
},
body: JSON.stringify({ tenant_id: 'aa7d7fae-0386-4d8a-b977-72f856eac242' }),
});
const data = await res.json();import requests
res = requests.post(
"https://api.swarmz.net/functions/v1/platform-unsuspend",
headers={"Authorization": "Bearer sk_live_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"},
json={"tenant_id": "aa7d7fae-0386-4d8a-b977-72f856eac242"},
)
data = res.json()Response
A fresh unsuspend returns the restore report:
{
"ok": true,
"status": "active",
"report": {
"restoredProjects": [],
"reboundDomains": [],
"resumedCloud": [],
"errors": []
}
}If the tenant is already active (or has no client_status set), the call short-circuits before any replay:
{ "ok": true, "status": "active", "already": true }| Field | Type | Description |
|---|---|---|
ok | boolean | Always true on success. |
status | string | Always "active". |
already | boolean | Present and true only when the tenant was already active (no replay ran). Absent on a fresh unsuspend. |
report | object | The restore summary. Absent when already: true. |
report.restoredProjects | string[] | Projects whose public site was republished. |
report.reboundDomains | string[] | Custom domains that were rebound. |
report.resumedCloud | string[] | Managed-cloud resources that were resumed. |
report.errors | string[] | Per-step failures, if any. The status flip to active is authoritative even if a replay step fails. |
Errors
| Status | error | reason | When |
|---|---|---|---|
| 400 | missing_fields | tenant_id or external_ref required | Neither identifier supplied (bearer path) |
| 400 | missing_fields | account_id required for internal unsuspend | Internal-path call with no account_id |
| 401 | unauthorized | missing_bearer / invalid_key / account_disabled | See Authentication |
| 404 | tenant_not_found | — | No tenant matched the identifier under your account |
| 405 | method_not_allowed | — | Anything other than POST |
| 410 | terminated | — | The tenant has been terminated and cannot be unsuspended |
| 429 | rate_limited | per_key / per_ip | Rate limit hit — see Rate limits |
| 500 | unsuspend_failed | RPC message | The status-flip RPC (platform_set_client_status) failed; safe to retry |
| 500 | internal_error | — | Unhandled server error; safe to retry |
Idempotency
Unsuspend is idempotent by state. An already-active tenant returns already: true; the replay does not run twice. There is no idempotency key — client_status is the source of truth. See Idempotency.
Notes
Preview pods wake on the next SSO
Unsuspend restores published projects, domains, and cloud, but it does not wake
preview pods — those resume on the tenant's next SSO. A terminated
tenant cannot be unsuspended; the call returns 410 terminated.
- Address the tenant by
tenant_idfromcreate;external_refis the fallback. - The
account_idparameter andX-Internal-Mint-Secretpath exist for the reseller dashboard's server-to-server calls only; host integrations use the bearer key and never sendaccount_id.
Suspend a tenant
Reversibly pause a tenant — flip it to suspended, take its public site offline, and tear down running infrastructure. The prior state is captured for unsuspend to replay.
Terminate a tenant
Permanently delete a tenant and all of its infrastructure. Final and irreversible — a missing workspace is treated as idempotent success.