Skip to content

Cancel a web hosting account

POST /api/v2/shared-hosting/{accountId}/actions/cancel

Cancel a web hosting account at the end of the paid period (the default) or right away. When the cancellation takes effect, every website, file, database and mailbox on the account is removed. Any unpaid renewal invoice for the account is withdrawn. The account holder gets an e-mail. On cPanel accounts, before cancelling, list every main, addon and parked domain with GET /api/v2/shared-hosting/{accountId}/domains. When there is more than one, send all their names in confirmedHostedDomains. The endpoint compares them with a fresh cPanel inventory. A missing or outdated list returns 409 hosting_domain_impact_confirmation_required with the current list. Nothing is cancelled then. When the current cPanel site-domain inventory cannot be read, the cancellation goes ahead without this check. Accounts that are not on cPanel skip the check. An account that is still an unpaid order has the order and its invoice cancelled instead (cancelledPendingOrder: true). To take a cancellation back before it takes effect, use DELETE /api/v2/shared-hosting/{accountId}/cancellation. Contacts cannot cancel services.

Authentication: An API key with the scope write:billing. About keys and scopes

Request

Path parameters

accountIdstringrequired
The web hosting account ID (acct_…).

Body

reasonstring
Why you cancel. Any text of 1 to 500 characters is accepted.
cancelTypestring
end_of_period: cancel at the end of the current billing period. immediate: cancel as soon as it is processed. One of immediate, end_of_period.
otherReasonstring
Your own explanation when reason is other. Leave it out for the standard reasons.
confirmedHostedDomainsarray of string
The exact list of the account’s current main, addon and parked domains, as shown in the confirmation. Required when the account has more than one site domain. Get the list from GET /api/v2/shared-hosting/{accountId}/domains. If it changes before you send, the server answers with a new 409 confirmation.

Example

POST /api/v2/shared-hosting/{accountId}/actions/cancel
curl -X POST "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/actions/cancel" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "Moving to another provider",
"cancelType": "end_of_period",
"confirmedHostedDomains": [
"example.com",
"example.se"
]
}'

Responses

200 The request was accepted. Either the saved cancellation could not be read yet (cancellationLookupPending: true) or an unpaid order was cancelled (cancelledPendingOrder: true).

{
"accountId": "acct_01hxa3b4c5d6e7f8g9h0j1k2m3",
"status": "none",
"cancelledAt": null,
"scheduledAt": null,
"reason": null,
"cancelType": null,
"revokable": false,
"cancellationLookupPending": true,
"submissionAccepted": true,
"notice": {
"code": "cancellation_record_pending",
"detail": "Cancellation request accepted, but the stored cancellation record is not available yet. Re-read the cancellation status shortly."
}
}
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

201 The cancellation was saved.

Response 201
{
"accountId": "acct_01hxa3b4c5d6e7f8g9h0j1k2m3",
"status": "pending",
"cancelledAt": "2026-11-02T09:30:00.000Z",
"scheduledAt": "2026-12-01T00:00:00.000Z",
"reason": "Moving to another provider",
"cancelType": "end_of_period",
"revokable": true
}
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.
403Contacts cannot cancel services.
404Not found. The resource does not exist or is not owned by the caller; code is shared_hosting_not_found.
409The account hosts more than one site and confirmedHostedDomains is missing or does not match the account’s domains (hosting_domain_impact_confirmation_required). Nothing was cancelled.
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.