Skip to content

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

accountIdstringrequired
The web hosting account ID (acct_…).

Example

GET /api/v2/shared-hosting/{accountId}/cancellation
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.

Response 200
{
"accountId": "acct_01hxa3b4c5d6e7f8g9h0j1k2m3",
"status": "none",
"cancelledAt": null,
"scheduledAt": null,
"reason": null,
"cancelType": null,
"revokable": false
}
Response fields
accountIdstring
The web hosting account ID (acct_…).
statusstring
none means there is no cancellation. The status endpoint still returns 200 with the same shape. One of pending, scheduled, completed, revoked, none.
cancelledAtstring or null
When the cancellation was requested, if known.
scheduledAtstring or null
When 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 null
The cancellation reason. Null when there is no cancellation.
cancelTypestring or null
When the cancellation takes effect. Null when there is no cancellation or the timing was not recorded. One of immediate, end_of_period.
revokableboolean
True while the cancellation is pending or scheduled. Remove it with DELETE /api/v2/shared-hosting/{accountId}/cancellation.
cancelledPendingOrderboolean
Present only when the hosting account was still a pending order. The order was then cancelled instead of the service.
cancelledOrderIdstring
The order ID when cancelledPendingOrder is true.
cancellationLookupPendingboolean
Present 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.
submissionAcceptedboolean
Present with cancellationLookupPending. Confirms that the request was accepted.
noticeobject
codestring
One of pending_order_cancelled, cancellation_record_pending.
detailstring

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not found. The resource does not exist or is not owned by the caller; code is shared_hosting_not_found.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.