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
accountIdstringrequiredacct_…).Body
reasonstringcancelTypestringend_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.otherReasonstringreason is other. Leave it out for the standard reasons.confirmedHostedDomainsarray of stringGET /api/v2/shared-hosting/{accountId}/domains. If it changes before you send, the server answers with a new 409 confirmation.Example
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" ] }'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": "other", "otherReason": "The site has moved to another platform.", "cancelType": "immediate" }'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." }}{ "accountId": "acct_01hxa3b4c5d6e7f8g9h0j1k2m3", "status": "none", "cancelledAt": null, "scheduledAt": null, "reason": null, "cancelType": null, "revokable": false, "cancelledPendingOrder": true, "cancelledOrderId": "ord_01hxa3b4c5d6e7f8g9h0j1k2m3", "notice": { "code": "pending_order_cancelled", "detail": "Pending order and related invoice have been cancelled." }}Response fields
accountIdstringacct_…).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 nullscheduledAtstring or nullend_of_period it is the end of the paid period. For immediate it equals cancelledAt, the time of the request.reasonstring or nullcancelTypestring or nullimmediate, end_of_period.revokablebooleanDELETE /api/v2/shared-hosting/{accountId}/cancellation.cancelledPendingOrderbooleancancelledOrderIdstringcancelledPendingOrder is true.cancellationLookupPendingbooleanGET /api/v2/shared-hosting/{accountId}/cancellation again shortly.submissionAcceptedbooleancancellationLookupPending. Confirms that the request was accepted.noticeobjectcodestringpending_order_cancelled, cancellation_record_pending.detailstring201 The cancellation was saved.
{ "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
accountIdstringacct_…).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 nullscheduledAtstring or nullend_of_period it is the end of the paid period. For immediate it equals cancelledAt, the time of the request.reasonstring or nullcancelTypestring or nullimmediate, end_of_period.revokablebooleanDELETE /api/v2/shared-hosting/{accountId}/cancellation.cancelledPendingOrderbooleancancelledOrderIdstringcancelledPendingOrder is true.cancellationLookupPendingbooleanGET /api/v2/shared-hosting/{accountId}/cancellation again shortly.submissionAcceptedbooleancancellationLookupPending. Confirms that the request was accepted.noticeobjectcodestringpending_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 | Contacts cannot cancel services. |
| 404 | Not found. The resource does not exist or is not owned by the caller; code is shared_hosting_not_found. |
| 409 | The 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. |
| 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. |