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
currentPasswordstringExample
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.
{ "closedAt": "2026-10-06T12:00:00.000Z"}Response fields
closedAtstringErrors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | The body is not a JSON object. currentPassword is also required unless the session has a BankID confirmation (invalid_request). |
| 401 | unauthorized: not signed in. invalid_credentials: the current password is wrong. bankid_verification_required: the BankID confirmation has expired or was already used. |
| 403 | API keys, contacts and delegated-access logins cannot close the account. |
| 404 | Not found. The resource does not exist or is not owned by the caller. |
| 409 | Nothing 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. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |
| 502 | The account could not be checked or closed right now (upstream_failed). Nothing was changed. Try again later. |
| 503 | Another change to the account’s sign-in details is in progress (service_unavailable). Try again shortly. |