Skip to main content

Suspend the service via the WHMCS module hook

POST 

/services/:id/suspend

Calls WhmcsApiClient::moduleSuspend. 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>' is set.

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

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

vps_id null: 422 service_not_provisioned (a service that is not provisioned cannot be suspended). For a management=basic service vps_id is not looked up; the WHMCS module applies it.

Body: {"reason": "..."} optional (1-255 chars). 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. In the Phase 2 MVP there is NO delivery; 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)