suspendreseller — WAP API
Suspend a reseller and its accounts through the WAP root administrator API, with request fields, response details, errors and cURL/Python/PHP examples.
/api/v1/suspendreseller/Also accepts GETRuns the reseller suspension operation for the reseller and its account tree. The target must be a reseller and must not already be suspended. A blank reason becomes Reseller Suspended via api. This affects customer accounts as well as the reseller; review the account tree first. The underlying wrapper invokes the reseller-wide CLI and does not check its exit status, so a success response is not proof that every account changed successfully. Verify the resulting suspension state and server logs.
Request
| Property | Value |
|---|---|
| Methods | GET, POST |
| Versioned path | /api/v1/suspendreseller/ |
| Default path | /api/suspendreseller/ |
| Authentication | WAP root administrator API credentials. |
| Header | Required value |
|---|---|
X-API-USER | Your WAP API username. |
X-API-PASSWORD | Its API password. |
Parameters
| Field | Required | Type and behavior |
|---|---|---|
user | Yes | String. Existing reseller username; required state is described above. |
reason | No | String. Optional suspension explanation; blank uses the default described above. |
POST reads the JSON/form body; GET reads query parameters. The examples use form-encoded POST. Although GET is supported, use POST for account changes and login-link generation so action fields are not placed in URLs. Authentication remains in the two headers. Undeclared fields are not additional API options.
Replace server.example.com, billing_api and YOUR_API_PASSWORD in each standalone example. Replace operation sample values with your actual target and an existing package where required. Python needs Requests; PHP needs the cURL extension. These examples make real calls when run.
Success response
HTTP 200. Illustrative values; account records and server values vary. Stored account examples show only selected fields.
{
"data": "Reseller account suspended exampleuser",
"info": "Hosting reseller account suspended successfully",
"status": 200
}| Field | Type | Meaning |
|---|---|---|
status | integer | 200 on the documented success branch. |
info | string | Operation description. |
data | string | Success message. |
Verify the resulting account state and logs independently: the command wrapper does not validate the CLI exit code.
Errors and demo mode
| Condition | Actual HTTP status | Response behavior |
|---|---|---|
| Missing credentials with no other authenticated identity | 403 | detail: Authentication credentials were not provided. |
| Rejected password or source IP | 403 | detail: Invalid API credentials |
| Demo server | 400 | error: Demo server; info: Api Operations not available in demo server; JSON status: 403. |
| Invalid/missing operation fields or invalid target state | 400 | Field errors in error; JSON status: 400. |
| Backend reports failure | 400 | Operation error in error; JSON status: 500. |
| Unsupported method | 405 after authentication | Method-not-allowed response. |
Validation failure description: Unable to suspend reseller hosting account. The data is invalid. This account may not have existed or it is already suspended..
Check both the HTTP status and JSON shape. Authentication failures do not use the operation envelope. Unexpected uncaught server errors are not guaranteed to return the documented JSON shape. Do not automatically retry account creation, password changes, deletions or SSO generation after a timeout: confirm the actual state first.