Swarmz

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.

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

Reverses 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 }
FieldTypeDescription
okbooleanAlways true on success.
statusstringAlways "active".
alreadybooleanPresent and true only when the tenant was already active (no replay ran). Absent on a fresh unsuspend.
reportobjectThe restore summary. Absent when already: true.
report.restoredProjectsstring[]Projects whose public site was republished.
report.reboundDomainsstring[]Custom domains that were rebound.
report.resumedCloudstring[]Managed-cloud resources that were resumed.
report.errorsstring[]Per-step failures, if any. The status flip to active is authoritative even if a replay step fails.

Errors

StatuserrorreasonWhen
400missing_fieldstenant_id or external_ref requiredNeither identifier supplied (bearer path)
400missing_fieldsaccount_id required for internal unsuspendInternal-path call with no account_id
401unauthorizedmissing_bearer / invalid_key / account_disabledSee Authentication
404tenant_not_foundNo tenant matched the identifier under your account
405method_not_allowedAnything other than POST
410terminatedThe tenant has been terminated and cannot be unsuspended
429rate_limitedper_key / per_ipRate limit hit — see Rate limits
500unsuspend_failedRPC messageThe status-flip RPC (platform_set_client_status) failed; safe to retry
500internal_errorUnhandled 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_id from create; external_ref is the fallback.
  • The account_id parameter and X-Internal-Mint-Secret path exist for the reseller dashboard's server-to-server calls only; host integrations use the bearer key and never send account_id.

On this page