Get web hosting cancellation status
GET /api/v2/shared-hosting/{accountId}/cancellation
Get the cancellation state of a web hosting account. Without a cancellation the call answers 200 with status none, not 404. scheduledAt is when the account ends, if known: the end of the paid period for end_of_period, the time of the request for immediate. When revokable is true, DELETE /api/v2/shared-hosting/{accountId}/cancellation withdraws the cancellation. To cancel an account, use POST /api/v2/shared-hosting/{accountId}/actions/cancel.
Authentication: An API key with the scope read:hosting. About keys and scopes
Request
Path parameters
accountIdstringrequiredThe web hosting account ID (
acct_…).Example
curl "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/cancellation" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 The account’s cancellation state.
{ "accountId": "acct_01hxa3b4c5d6e7f8g9h0j1k2m3", "status": "none", "cancelledAt": null, "scheduledAt": null, "reason": null, "cancelType": null, "revokable": false}Response fields
accountIdstringThe web hosting account ID (
acct_…).statusstringnone means there is no cancellation. The status endpoint still returns 200 with the same shape. One of pending, scheduled, completed, revoked, none.cancelledAtstring or nullWhen the cancellation was requested, if known.
scheduledAtstring or nullWhen the cancellation takes effect, if known. For
end_of_period it is the end of the paid period. For immediate it equals cancelledAt, the time of the request.reasonstring or nullThe cancellation reason. Null when there is no cancellation.
cancelTypestring or nullWhen the cancellation takes effect. Null when there is no cancellation or the timing was not recorded. One of
immediate, end_of_period.revokablebooleanTrue while the cancellation is pending or scheduled. Remove it with
DELETE /api/v2/shared-hosting/{accountId}/cancellation.cancelledPendingOrderbooleanPresent only when the hosting account was still a pending order. The order was then cancelled instead of the service.
cancelledOrderIdstringThe order ID when
cancelledPendingOrder is true.cancellationLookupPendingbooleanPresent only when the request was accepted but the cancellation could not be read back yet. Call
GET /api/v2/shared-hosting/{accountId}/cancellation again shortly.submissionAcceptedbooleanPresent with
cancellationLookupPending. Confirms that the request was accepted.noticeobjectcodestringOne of
pending_order_cancelled, cancellation_record_pending.detailstringErrors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller; code is shared_hosting_not_found. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |