Terminate the reseller; refused while it has accounts unless cascade=true
Generated from the OpenAPI contract. Sessions send the CSRF header on writes; API keys use a Bearer token. Authentication
/api/v1/tenants/{tid}/provisioning/resellers/{ref} may answer 202Terminate the reseller; refused while it has accounts unless cascade=true. Runs in the background (ADR 0131)
Permissions: plan.manage, site.read, site.write, database.read, database.write, mail.read, mail.write. With cascade, each customer is ended as its own background end first. 204 when finished within a few seconds; otherwise 202 with the progress (Ending), Location the reseller, whose ending field shows it until terminated_at is set and reseller.terminated is sent.
Authentication: API key (Authorization: Bearer …) or session cookie __Host-panel_session.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tid | path | string | required | |
ref | path | string | required | The billing system's own reference: 1 to 64 of A-Z a-z 0-9 . _ : -
|
confirm | query | string | required | |
cascade | query | boolean | optional | |
keep_backups_days | query | integer | optional | Remove the reseller's backups, and with cascade each customer's, after this many days (0: now); left out, they are kept
|
Idempotency-Key | header | string | optional | Same key and same request within 24 hours: the first answer is replayed (header Idempotent-Replayed: true). Same key, different request: 422 IDEMPOTENCY_KEY_REUSED.
|
X-CSRF-Token | header | string | optional | Required on unsafe requests authenticated by session cookie; API keys do not use it. |
Responses
202 Ending: the removal runs in the background
| Header | Type | Description |
|---|---|---|
Location | string |
Content type: application/json
How far an account's end got (ADR 0131). The end runs in the background: a failed step is tried again at next_try_at (1, 2, 4, 8 then every 15 minutes), or at once when the end is asked again.
statestring requiredAllowed values:"ending""ended""not_ending"tenant_idstring requiredrefstring optionalresellerboolean requiredstarted_atstring (date-time) optionalended_atstring (date-time) optionalnamestring requiredAllowed values:"customers""sites""databases""mail""caches""dns""backups"statestring requiredAllowed values:"waiting""running""done""failed"totalinteger requireddoneinteger requiredcodestring requiredmessagestring requiredretryableboolean required
attemptsinteger requiredPasses that stopped on an error
Fields of StepError are shown above.
next_try_atstring (date-time) optionalWith keep_backups_days 0: off-machine copies given up because their target did not answer; the end completes without them
backup_idstring requiredtargetstring requiredsftp, s3, or the cloud provider
wherestring optionalFolder or bucket the copy is in, as the backup settings named it (no secret)
created_atstring (date-time) requiredcodestring requiredWhy its deletion failed, e.g. BACKUP_DELETE_FAILED, SERVER_TIMEOUT
atstring (date-time) required
Example
{
"state": "ending",
"tenant_id": "string",
"ref": "string",
"reseller": true,
"started_at": "2026-01-01T00:00:00Z",
"ended_at": "2026-01-01T00:00:00Z",
"steps": [
{
"name": "customers",
"state": "waiting",
"total": 0,
"done": 0,
"error": {
"code": "string",
"message": "string",
"retryable": true
}
}
],
"attempts": 0,
"last_error": {
"code": "string",
"message": "string",
"retryable": true
},
"next_try_at": "2026-01-01T00:00:00Z",
"remote_backups_left": [
{
"backup_id": "string",
"target": "string",
"where": "string",
"created_at": "2026-01-01T00:00:00Z",
"code": "string",
"at": "2026-01-01T00:00:00Z"
}
]
}204 Terminated
429 Error
Content type: application/json
codestring requiredmessagestring requireddetails_redactedboolean requiredcorrelation_idstring requiredretryableboolean required
default Error
Content type: application/json