Cancel shared-hosting account

Submit a cancellation request for a shared-hosting account. Get {accountId} from GET /api/v2/shared-hosting data[].id. 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…

Read full description Hide full description

Submit a cancellation request for a shared-hosting account. Get {accountId} from GET /api/v2/shared-hosting data[].id. 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. The body accepts only reason, optional cancelType, and optional otherReason; unknown fields are rejected. If the response has cancellationLookupPending: true, the request was accepted and the caller should poll the status endpoint shortly. Cancellation can return 409 when an overdue invoice blocks the request.

Web Hosting Hosting Accounts

Authentication

Required API scope: write:billing

Use Authorization: Bearer <token> for API keys. Dashboard sessions may also use hostup_session.

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

Accept Example
Content-Type Example

Body

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

Cancellation reason. The customer portal currently sends values such as `No longer needed`, `Found a better alternative`, `Too expensive`, `Poor performance`, `Technical issues`, `Moving to different provider`, `Business closure`, or `other`. 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.

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 stringnull · Example: 2026-04-27T12:00:00.000Z

When the cancellation request was recorded, if known.

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

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

reason stringnull · Example: Too expensive

Stored cancellation reason, or null when no cancellation exists.

cancelType stringnull · 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 stringnull · Example: 2026-04-27T12:00:00.000Z

When the cancellation request was recorded, if known.

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

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

reason stringnull · Example: Too expensive

Stored cancellation reason, or null when no cancellation exists.

cancelType stringnull · 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 Forbidden. The caller lacks a required scope or does not own the resource.
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.
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 Conflict. See the Problem Details `code` for the route-specific blocker and recovery fields.
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
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"
  }'
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"
}