Skip to main content

Suspend the service via the WHMCS module hook

POST 

/services/:id/suspend

WhmcsApiClient::moduleSuspend is called. WHMCS triggers its own virtualizor module, and the queue cron turns it into a Virtualizor suspendvs job. In our DB mod_reseller_provisions.status='suspended' + notice='Suspended via API: <reason>' are set.

Idempotency-Key: OPTIONAL (if the header is sent, the middleware applies). Suspend is already idempotent (if already suspended, WHMCS no-op).

Rate limit: Default bucket (60 rpm) — lifecycle is not high-frequency.

vps_id null: 422 service_not_provisioned (a non-provisioned service cannot be suspended).

Body: {"reason": "..."} optional (1-255 char). Default: "Suspended via Reseller API". So it can be in sync with the reason shown in the reseller's WHMCS.

Side effect: A service.suspended event (status='skipped') is written to the mod_reseller_webhooks_queue table. No delivery in the Phase 2 MVP; the v2 worker pushes these events to reseller webhook URLs.

Request

Responses

Service suspended

Response Headers
    X-RateLimit-Limit

    The per-minute limit defined for this key

    X-RateLimit-Remaining

    Number of requests remaining in the current window

    X-RateLimit-Reset

    Unix epoch of the start of the next window (UTC seconds)