Cancel shared-hosting account

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

Submit a cancellation request for a shared-hosting account.

Get {accountId} from GET /api/v2/shared-hosting data[].id.

On cPanel accounts, before cancelling, retrieve GET /api/v2/shared-hosting/{accountId}/domains and show every main, addon, and parked domain: one hosting-account cancellation removes all listed sites, aliases, files, databases, and mailboxes.

When multiple site-level domains exist, send their exact names in confirmedHostedDomains; the endpoint fetches a fresh cPanel inventory and returns 409 hosting_domain_impact_confirmation_required if confirmation is missing or stale.

Legacy/non-cPanel cancellations follow the prior path without an addon-domain inventory or confirmedHostedDomains requirement.

Use GET /api/v2/shared-hosting/{accountId}/cancellation to read the current cancellation status and DELETE /api/v2/shared-hosting/{accountId}/cancellation to remove a pending or scheduled cancellation.

Unknown request fields are rejected.

If the response has cancellationLookupPending: true, the request was accepted and the caller should poll the status endpoint shortly.

When the stored hosting expiry is in the past, the existing debt-preserving path disables automatic renewal and returns 409 cancellation_blocked_overdue_invoice with autoRenewDisabled: true and recovery.action: pay_outstanding_invoice.

This is not a completed cancellation: no account cancellation request is submitted and no invoice is voided.

Staff can terminate the account separately while preserving its debt.

Failure to disable or verify renewal returns a service-unavailable error instead of claiming success.

Contact-level logins cannot cancel services and receive 403.

Web Hosting Hosting Accounts

Authentication

Required API scope: write:billing

Authenticate with an API key in the Authorization: Bearer <token> header.

Context

Path Parameters

accountId string required Example: acct_01hxa3b4c5d6e7f8g9h0j1k2m3

Public shared-hosting account ID from GET /api/v2/shared-hosting data[].id. Do not invent this value; use the exact ID returned by the referenced API response.

Headers

Authorization Bearer <token>
Accept application/json
Content-Type application/json

Body

required
application/json
reason string · Example: Moving to different provider

Cancellation reason. The API accepts any non-empty string up to 500 characters.

cancelType string · enum · Example: end_of_period

end_of_period requests cancellation at the end of the current billing period. immediate requests cancellation as soon as processing completes.

immediate
end_of_period
otherReason string · Example: Consolidating services into another account.

Free-text explanation when reason is other. Omit this field for standard reason values.

confirmedHostedDomains array<string> · Example: ["example.com","additional.example.com"]

Exact list of the current main, addon, and parked domains shown during destructive confirmation. Required when the account contains multiple site-level domains. Retrieve the list from GET /api/v2/shared-hosting/{accountId}/domains; if it changes before submission, the server returns a fresh 409 confirmation challenge.

Responses

200 Cancellation request accepted, but there is no readable service cancellation record yet.
accountId string · Example: acct_01hxa3b4c5d6e7f8g9h0j1k2m3

Public shared-hosting account ID from GET /api/v2/shared-hosting data[].id.

status string · enum · Example: scheduled

none means no cancellation record exists; the status endpoint still returns 200 with the stable cancellation shape.

pending
scheduled
completed
revoked
none
cancelledAt string · nullable · Example: 2026-04-27T12:00:00.000Z

When the cancellation request was recorded, if known.

scheduledAt string · nullable · Example: 2026-05-27T00:00:00.000Z

Effective cancellation date if known. For immediate cancellation this may match cancelledAt.

reason string · nullable · Example: Too expensive

Stored cancellation reason, or null when no cancellation exists.

cancelType string · nullable · enum · Example: end_of_period

Requested cancellation timing, or null when no cancellation exists or the stored record did not expose timing.

immediate
end_of_period
revokable boolean · Example: true

True while the cancellation is pending or scheduled and can be removed with DELETE /api/v2/shared-hosting/{accountId}/cancellation.

cancelledPendingOrder boolean · Example: true

Present only when the service was still a pending order and the API cancelled the pending order instead of creating a service cancellation.

cancelledOrderId string · Example: ord_01hxa3b4c5d6e7f8g9h0j1k2m3

Public order ID when cancelledPendingOrder is true.

cancellationLookupPending boolean · Example: true

Present only when the cancellation request was accepted but the stored cancellation record was not readable yet. Poll GET /api/v2/shared-hosting/{accountId}/cancellation shortly after receiving this state.

submissionAccepted boolean · Example: true

Present with cancellationLookupPending to confirm the cancellation request was accepted.

notice object
notice.code string · enum required · Example: cancellation_record_pending
pending_order_cancelled
cancellation_record_pending
notice.detail string required · Example: Cancellation request accepted, but the stored cancellation record is not available yet....
201 Cancellation created and readable.
accountId string · Example: acct_01hxa3b4c5d6e7f8g9h0j1k2m3

Public shared-hosting account ID from GET /api/v2/shared-hosting data[].id.

status string · enum · Example: scheduled

none means no cancellation record exists; the status endpoint still returns 200 with the stable cancellation shape.

pending
scheduled
completed
revoked
none
cancelledAt string · nullable · Example: 2026-04-27T12:00:00.000Z

When the cancellation request was recorded, if known.

scheduledAt string · nullable · Example: 2026-05-27T00:00:00.000Z

Effective cancellation date if known. For immediate cancellation this may match cancelledAt.

reason string · nullable · Example: Too expensive

Stored cancellation reason, or null when no cancellation exists.

cancelType string · nullable · enum · Example: end_of_period

Requested cancellation timing, or null when no cancellation exists or the stored record did not expose timing.

immediate
end_of_period
revokable boolean · Example: true

True while the cancellation is pending or scheduled and can be removed with DELETE /api/v2/shared-hosting/{accountId}/cancellation.

cancelledPendingOrder boolean · Example: true

Present only when the service was still a pending order and the API cancelled the pending order instead of creating a service cancellation.

cancelledOrderId string · Example: ord_01hxa3b4c5d6e7f8g9h0j1k2m3

Public order ID when cancelledPendingOrder is true.

cancellationLookupPending boolean · Example: true

Present only when the cancellation request was accepted but the stored cancellation record was not readable yet. Poll GET /api/v2/shared-hosting/{accountId}/cancellation shortly after receiving this state.

submissionAccepted boolean · Example: true

Present with cancellationLookupPending to confirm the cancellation request was accepted.

notice object
notice.code string · enum required · Example: cancellation_record_pending
pending_order_cancelled
cancellation_record_pending
notice.detail string required · Example: Cancellation request accepted, but the stored cancellation record is not available yet....
400 Invalid request. The response body is an RFC 7807 Problem Details document.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
401 Unauthorized. Authentication is required.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
403 Contact-level logins are not allowed to cancel services.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
404 Not found. The resource does not exist or is not owned by the caller; code is shared_hosting_not_found.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
409 Exact domain-impact confirmation is required, or an expired hosting period takes the debt-preserving path: automatic renewal is disabled, no account cancellation request is submitted, and existing invoices remain unchanged.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
429 Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
500 Internal error. Retry later or contact support if the issue persists.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
502 The current cPanel site-domain inventory could not be verified, so no cancellation was submitted.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
POST https://cloud.hostup.se/api/v2/shared-hosting/{accountId}/actions/cancel
For AI assistants
View as Markdown
cURL
curl -X POST "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/actions/cancel" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Too expensive",
    "cancelType": "end_of_period",
    "confirmedHostedDomains": [
      "example.com",
      "additional.example.com"
    ]
  }'
Response
{
  "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."
  }
}
Request Body Cancel at billing period end
{
  "reason": "Too expensive",
  "cancelType": "end_of_period",
  "confirmedHostedDomains": [
    "example.com",
    "additional.example.com"
  ]
}