# Closing accounts and account groups Closing either an account or an account group is a two step process: 1. You indicate your intention to close the account group or account via the Investment API. 2. Upvest will check that the preconditions for closing an account group or account have been met. After calling the Investment API to close an account group or an account, the status of the corresponding resource will be `CLOSING`. As soon as all requirements are met, the account or account group is finally closed in the `CLOSED` state. You will always be able to retrieve historical information about accounts that have already been closed. Please note that depending on the domicile of the user, the timing of account closure may vary, for example in the UK accounts will only be closed at the end of a tax year. ## Prerequisites - You can only close an account or an account group that has been already created in the Investment API. - The account/account group to be closed must not contain any outstanding withdrawals. ## Closing an account To close an account send **DELETE** [`/accounts/{account_id}`](/api/accounts/account_closure) The account, specified by its ID, will be set to a `CLOSING` status and remains in this status as long as there are open positions or expected corporate actions outstanding. After all these preconditions for closure are met, the account status will be updated to `CLOSED`. At this point you will receive a webhook with the respective [account closed event](/api/accounts/account_event). Webhooks notify you of events in business processes, not the success or failure of the initialisation of those processes. Please be sure to check the [HTTP status](/api_errors) of the response to your requests and handle failure cases appropriately. ## Closing an account group To close an account group send **DELETE** [`/account_groups/{account_group_id}`](/api/account-groups/account_group_closure) The account group specified by its ID is set to a `CLOSING` status and remains in this status as long as there are non-closed accounts associated with the account goup, a fee balance is outstanding or the account group still has an open cash balance. After all the prerequisites are completed, the account group status will reflect `CLOSED`. To inform you about the final closure of the account group, you will receive a webhook with the respective [account group closed event](/api/account-groups/account_group_event). Furthermore you will receive an additional webhook that informs you about the [creation of a PDF report](/api/reports/report_event) of the type `ACCOUNT_CLOSING`. The tax processes and especially the annual tax statement for German tax residents is processed around March of the following year. For example, if you close an account group on the January 1st of a year, the annual tax statement will be communicated in March the year after. Webhooks notify you of events in business processes, not the success or failure of the initialisation of those processes. Please be sure to check the [HTTP status](/api_errors) of the response to your requests and handle failure cases appropriately. ## Next Steps Closing accounts and account groups is a prerequisite of [User offboarding](/products/byol/guides/users/users_offboarding).