---
title: "Close an account group by ID"
method: DELETE
path: "/account_groups/{account_group_id}"
tags: ["Account Groups"]
---

# Close an account group by ID

`DELETE /account_groups/{account_group_id}`

## Request

- Base URL: `https://sandbox.upvest.co`
- URL: `https://sandbox.upvest.co/account_groups/{account_group_id}`
- Auth: OAuth 2 (client credentials, token URL `https://sandbox.upvest.co/auth/token`, scopes: `accounts:admin`)

Initiates the closure of the account group specified by its ID.

Closure is a two-step process: the account group status changes to `CLOSING`, and once all preconditions are met it transitions to `CLOSED`. Subscribe to the `ACCOUNT_GROUP.CLOSING_INITIATED` and `ACCOUNT_GROUP.CLOSED` webhook events to track progress.

See the Closing accounts guide ([TOL](https://docs.upvest.co/products/tol/guides/accounts/accounts_close_accounts) / [BYOL](https://docs.upvest.co/products/byol/guides/accounts/accounts_close_accounts)) for preconditions and implementation details.

## Query parameters

- `closure_reason` 'dunning' | 'power_of_attorney' | 'loss_of_legal_capacity' | 'aml' | 'risk_based' | 'contract_breach' | 'user_initiated'
- `notification_only` boolean

## Response `202`

The request has been successfully accepted and will be processed asynchronously.

## Other responses

- `400`: Bad Request. The incoming request had a malformed parameter/object.
- `401`: Unauthorized. The caller has not been authenticated.
- `403`: Forbidden. The caller has been authenticated but is not allowed to take the requested action.
- `404`: Not Found. The requested resource could not be found.
- `406`: Not Acceptable. The resource does not have a current representation that would be acceptable to the user agent. "Accept" header defined unsupported value.
- `409`: Conflict. An operation is not available for the current state of the resource.
- `429`: Too Many Requests. The caller has exceeded their quota for the time period and has been throttled.
- `500`: Internal Server Error. The service encountered an unexpected error.
- `503`: Service Unavailable. The service handling for this request cannot be reached at this time.
- `504`: Gateway Timeout. The service gateway has reached its internal timeout.

---

[API](https://skmtc.dev/upvest/apis/upvest-investment-api.md) · [All operations](https://skmtc.dev/upvest/apis/upvest-investment-api/llms.txt) · [OpenAPI document](https://skmtc.dev/upvest/apis/upvest-investment-api/revisions/ca69534b631d?raw)
