# Close the organization

Close your organization for good once nothing is running and nothing is owed, or mark it as being closed while you remove what is left.

**Important:**
Closing ends access for every member at once, and cannot be undone by you. The organization's data
is deleted at least 30 days after closure.

There is no waiting period: an organization with nothing running and nothing owed closes at once.
Anything used in the current month is on a final invoice at the start of the next month.

## Prerequisites

- Permission for `iam:DeleteOrganization` to close.
- `iam:GetOrganizationDeletion` to see what blocks closure. Without it, the settings page shows the
  close row as unavailable.
- (Optional) `iam:RequestOrganizationDeletion` to mark the organization as being closed, and
  `iam:CancelOrganizationDeletion` to cancel that.

## What blocks closure

Closure is refused while the organization owes money or runs or stores something:

- unpaid invoices, issued or overdue ("1 unpaid invoice", with the amount outstanding);
- every resource that is still running or holds data, one line per resource type ("2 volumes
  still running"). Resources that cost nothing and store nothing, such as security groups and key
  pairs, do not block and go with the organization.

The settings page lists the blockers in the order to remove them. An invoice line links to
**Billing** (**Open billing**); a resource line links to the resource inventory filtered to those
resources (**Show them**). The check runs again at the moment you close, not from what the page
last showed.

## Close

**Console**
1. Open **Organization settings**.
2. Under **Danger zone**, check that the list says "Nothing is left running and nothing is owed."
3. Choose **Close organization**.
4. Enter the organization's name, then choose **Close organization**.

The console then opens the sign-in page, which takes you to another organization you belong to, or
says what is left to do. Your own account stays: you can create another organization, join one, or
delete the account.

## Mark the organization as being closed

While blockers remain, you can mark the organization as being closed: every console page then says
so, and creating something new asks first. It keeps running and stays billable.

**Console**
1. Open **Organization settings**.
2. Under **Danger zone**, choose **Start closing**.
3. Enter the organization's name, then choose **Start closing**.

To cancel, choose **Keep organization** under **Cancel closing**.

## Result

A closed organization's status is `deleted`, every membership is suspended, nobody can sign in to
it, and its access keys stop working. At least 30 days after closure, its remaining data is
deleted, except the invoices with their line items, the billing account and the credits, which are
kept as legal records, and the organization's id and name, which the invoices refer to.

## When closing is refused

- `409` "… still block closure: …" while something blocks closure; the message names each blocker.
- `400` "The organization name did not match" when the name you entered is not the organization's.

## Related

- [Pay an invoice](pay-an-invoice.md)
- [Deleting your account](/docs/account-deletion)
