Skip to content

Close the account

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

Close your account for good. This cannot be undone. Only an account that holds nothing can be closed. Check GET /api/v2/me/actions/close-account first.

This call only works from a signed-in client-area session. An API key gets 403. Contacts and delegated-access logins cannot use it either. Confirm with currentPassword. An account owner who signs in with BankID can confirm with BankID in the client area instead.

Closing stops all sign-in. Every session, API key and linked sign-in method is revoked, the caller’s session included. The contacts and the personal details on the account are removed. Open support tickets are closed, except abuse cases. Issued invoices are kept. A confirmation goes to the e-mail address the account had.

Authentication: An API key with the scope write:account. About keys and scopes

Request

Body

currentPasswordstring
The current password. Needed unless the session has a fresh BankID confirmation.

Example

POST /api/v2/me/actions/close-account
curl -X POST "https://cloud.hostup.se/api/v2/me/actions/close-account" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"currentPassword": "current-account-password"
}'

Responses

200 The account is closed. Every session on it is signed out, the caller’s included.

Response 200
{
"closedAt": "2026-10-06T12:00:00.000Z"
}
Response fields
closedAtstring
When the account was closed.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400The body is not a JSON object. currentPassword is also required unless the session has a BankID confirmation (invalid_request).
401unauthorized: not signed in. invalid_credentials: the current password is wrong. bankid_verification_required: the BankID confirmation has expired or was already used.
403API keys, contacts and delegated-access logins cannot close the account.
404Not found. The resource does not exist or is not owned by the caller.
409Nothing was changed. account_closure_blocked: something is still on the account. The response carries the same fields as GET /api/v2/me/actions/close-account. blockers says what to resolve. account_inactive: the account is not active.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.
502The account could not be checked or closed right now (upstream_failed). Nothing was changed. Try again later.
503Another change to the account’s sign-in details is in progress (service_unavailable). Try again shortly.