Check whether the account can be closed

GET /api/v2/me/actions/close-account

Report whether the authenticated account can be closed right now and what is in the way.

An account can be closed only when it holds nothing: no active or suspended service, no active domain, no object storage, no unpaid invoice, no pending order and no unused credit.

blockers lists what remains, and the counts next to it say how much.

Closing itself is done from the account settings page in a browser session; see POST /api/v2/me/actions/close-account.

Contacts and delegated sessions cannot use this operation.

Account & Access Account

Authentication

Required API scope: read:account

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

Context

Headers

Authorization Bearer <token>
Accept application/json

Responses

200 Closure eligibility for the account.
available boolean required · Example: false

true when the account can be closed right now.

reason string · nullable required · Example: Before the account can be closed: cancel the active services, pay the open invoices.

Plain-English summary of what must be resolved first. null when available is true.

blockers array<string> required · Example: ["active_services","unpaid_invoices"]

What currently prevents the closure, in the order to resolve it. Empty when available is true.

activeServiceCount integer · min: 0 required · Example: 2

Services that are active or suspended. DNS zone management is not a service and is not counted. Closing is blocked while this is above 0.

activeDomainCount integer · min: 0 required · Example: 0

Domains that are active or have a registration or transfer in progress. Expired and transferred-out domains are not counted. Closing is blocked while this is above 0.

hasObjectStorage boolean required · Example: false

true when object storage is enabled on the account. Closing is blocked while it is.

unpaidInvoiceCount integer · min: 0 required · Example: 1

Number of currently unpaid invoices on the account. Closing is blocked while this is above 0.

pendingOrderCount integer · min: 0 required · Example: 0

Number of pending orders on the account. Closing is blocked while this is above 0.

creditBalance number · min: 0 required · Example: 0

Unused account credit in currencyCode. Closing is blocked while this is above 0; support refunds the credit first.

currencyCode string required · Example: SEK

ISO-4217 code of the account's billing currency.

openTicketCount integer · min: 0 required · Example: 0

Open support tickets that are closed together with the account. Abuse cases are not counted and stay open. Never a blocker.

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 Authentication is missing or invalid.

No response body

403 The authenticated identity is not the account owner (contact or delegated session), or the key lacks read:account.

No response body

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
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 account could not be checked right now (upstream_failed). Retry later.

No response body

GET https://cloud.hostup.se/api/v2/me/actions/close-account
For AI assistants
View as Markdown
cURL
curl -X GET "https://cloud.hostup.se/api/v2/me/actions/close-account" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Response
// Services and an invoice are in the way
{
  "available": false,
  "reason": "Before the account can be closed: cancel the active services, pay the open invoices.",
  "blockers": [
    "active_services",
    "unpaid_invoices"
  ],
  "activeServiceCount": 2,
  "activeDomainCount": 0,
  "hasObjectStorage": false,
  "unpaidInvoiceCount": 1,
  "pendingOrderCount": 0,
  "creditBalance": 0,
  "currencyCode": "SEK",
  "openTicketCount": 0
}

// The account can be closed
{
  "available": true,
  "reason": null,
  "blockers": [],
  "activeServiceCount": 0,
  "activeDomainCount": 0,
  "hasObjectStorage": false,
  "unpaidInvoiceCount": 0,
  "pendingOrderCount": 0,
  "creditBalance": 0,
  "currencyCode": "SEK",
  "openTicketCount": 1
}