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.

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.

If an overdue invoice blocks the request, the endpoint returns 409 cancellation_blocked_overdue_invoice and auto-renewal is disabled; pay the outstanding invoice, then retry.

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 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 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.
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 An overdue invoice blocks the cancellation. Auto-renewal is disabled on the service; pay the outstanding invoice, then retry.
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"
}