> ## Documentation Index
> Fetch the complete documentation index at: https://api.hellosunset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Closure Guide

> Automated Closure, estate closure steps, status tracking, and institution contact management.

# Automated Closure

Sunset can close accounts on your behalf. Instead of tracking closure work manually, you request closure on an account and Sunset handles the rest: we notify the institution of the death, submit the required documentation (including certified death certificates and notarized forms), manage all correspondence and follow-up, flag anything that needs a signature, and deposit the proceeds into the case's FDIC-insured Sunset estate account.

Automated Closure is free and currently supports:

| Account category                                     | How it's handled                                              |
| ---------------------------------------------------- | ------------------------------------------------------------- |
| Bank accounts (checking, savings, CDs, money market) | Closed; funds transferred to the estate account               |
| Retirement accounts (IRAs)                           | Closed or transferred per beneficiary designation             |
| Brokerage / investment accounts                      | Closed; assets liquidated or transferred                      |
| Life insurance policies                              | Filed as claims; proceeds paid to beneficiaries or the estate |

<Note>
  Automated Closure is requested from the Sunset app today. API endpoints for requesting and tracking closures programmatically are in development — see the [changelog](/changelog) for updates.
</Note>

## How Automated Closure Updates Existing Resources

Automated Closure works with the account and closure-step resources you already use — no schema changes are required to read progress:

* The account's `status` moves to `pending_closure` when a request is accepted and `closed` when it completes; `closed_date` and `closure_method` are set automatically.
* The case's `close_accounts` [closure step](#closure-steps) reflects automated progress: it moves to `in_progress` when the first closure request starts and `completed` when every account is resolved. A sub-task is created automatically for each account under closure.
* Related steps benefit too: institution notifications sent during closure also advance the `notify_institutions` step.

***

# Estate Closure

The closure process tracks the steps needed to fully settle an estate. The API provides a structured workflow with ordered steps, sub-tasks, and dependency tracking.

## Closure Status

Get the overall closure status and all steps:

```bash theme={null}
curl "https://api.example.com/v1/cases/{case_id}/closure"
```

Response includes:

```json theme={null}
{
  "data": {
    "overall_status": "in_progress",
    "completion_percentage": 45,
    "steps": [
      {
        "id": "...",
        "step_type": "notify_institutions",
        "title": "Notify Financial Institutions",
        "status": "completed",
        "order": 1
      },
      {
        "id": "...",
        "step_type": "close_accounts",
        "title": "Close Accounts",
        "status": "in_progress",
        "order": 2
      }
    ]
  }
}
```

## Closure Steps

Steps are processed in order. Each step can depend on previous steps being completed. Steps covered by [Automated Closure](#automated-closure) update automatically; the rest are tracked manually.

| Step                        | Description                                                              |
| --------------------------- | ------------------------------------------------------------------------ |
| `notify_institutions`       | Contact all banks and financial institutions to notify them of the death |
| `close_accounts`            | Close or retitle deceased accounts                                       |
| `cancel_recurring_payments` | Cancel autopay, subscriptions, and recurring debits                      |
| `pay_debts`                 | Settle outstanding creditor claims and debts                             |
| `file_final_taxes`          | File final income tax return and estate tax return if applicable         |
| `obtain_tax_clearance`      | Obtain tax clearance letter from the IRS and/or state                    |
| `file_final_accounting`     | File final accounting with the probate court                             |
| `distribute_assets`         | Distribute remaining assets to beneficiaries                             |
| `close_estate_accounts`     | Close the estate bank account                                            |
| `file_closing_documents`    | File closing documents with the court                                    |
| `discharge_executor`        | Obtain formal discharge of the executor                                  |

## Step Statuses

| Status        | Meaning                                             |
| ------------- | --------------------------------------------------- |
| `not_started` | Step hasn't begun                                   |
| `in_progress` | Actively being worked on                            |
| `blocked`     | Cannot proceed (see `blocked_reason`)               |
| `waiting`     | Waiting on a third party (institution, court, etc.) |
| `completed`   | Step is done                                        |
| `skipped`     | Not applicable to this estate                       |

## Sub-Tasks

Each closure step can have sub-tasks for granular tracking:

```bash theme={null}
# Add a sub-task
curl -X POST ".../closure/steps/{step_id}/sub-tasks" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Contact Chase Bank - Estate Services",
    "institution_contact_id": "01K8IC04DJ3T10HRYE78AN7DDD"
  }'

# Mark a sub-task complete
curl -X PATCH ".../closure/steps/{step_id}/sub-tasks/{sub_task_id}" \
  -H "Content-Type: application/json" \
  -d '{"completed": true}'
```

***

# Institution Contacts

Manage contact information for every financial institution involved in the estate. Contacts can be routed by account type and department.

<Note>
  With [Automated Closure](#automated-closure), Sunset locates estate departments and maintains institution contact information for you. Institution contacts remain fully editable for accounts you manage manually.
</Note>

## Adding a Contact Department

```bash theme={null}
curl -X POST "https://api.example.com/v1/cases/{case_id}/institution-contacts" \
  -H "Content-Type: application/json" \
  -d '{
    "institution_name": "Chase Bank",
    "department_name": "Estate Services Department",
    "is_default_contact": false,
    "account_types": ["bank"],
    "contact_methods": {
      "phone": "+11112223333",
      "phone_hours": "Mon-Fri 8am-6pm EST",
      "fax": "+11112223333",
      "email": "estates@chase.com",
      "mailing_address": {
        "address1": "123 Main Street",
        "city": "Salt Lake City",
        "state": "UT",
        "zip": "84101"
      },
      "website": "https://www.chase.com/personal/estates"
    },
    "reference_number": "EST-2025-00456",
    "notes": "Ask for estate services team, reference case number."
  }'
```

## Account Type Routing

Contacts can be configured to handle specific account types:

| Account Type | Description                            |
| ------------ | -------------------------------------- |
| `bank`       | Bank accounts (checking, savings, CDs) |
| `debt`       | All debt types (see subtypes below)    |
| `investment` | Investment and brokerage accounts      |
| `retirement` | 401(k), IRA, pension accounts          |
| `insurance`  | Life insurance and annuities           |

### Default Contact

Set `is_default_contact: true` to make a contact the fallback when no specific department matches the account type.

### All Account Types

Leave the `account_types` array **empty** to make a contact apply to ALL account types.

## Debt Subtypes

When `debt` is in the `account_types` array, you can optionally narrow the contact to specific debt types using `debt_subtypes`:

| Debt Subtype               | Description                     |
| -------------------------- | ------------------------------- |
| `credit_card`              | Credit card accounts            |
| `mortgage_and_real_estate` | Mortgage and real estate loans  |
| `auto_loans_and_leases`    | Auto loans and vehicle leases   |
| `personal_loan`            | Personal and signature loans    |
| `education`                | Student loans                   |
| `business_credit`          | Business credit lines and loans |
| `collections`              | Accounts in collections         |
| `medical`                  | Medical debt                    |
| `secured_loan`             | Other secured loans             |

Leave `debt_subtypes` **empty** to apply to all debt types.

### Example: Debt-Specific Contact

```bash theme={null}
curl -X POST ".../institution-contacts" \
  -H "Content-Type: application/json" \
  -d '{
    "institution_name": "Capital One",
    "department_name": "Deceased Account Services - Credit Cards",
    "account_types": ["debt"],
    "debt_subtypes": ["credit_card"],
    "contact_methods": {
      "phone": "+11112223333",
      "phone_hours": "Mon-Sat 8am-8pm EST",
      "fax": "+11112223333",
      "mailing_address": {
        "address1": "123 Main Street",
        "city": "Salt Lake City",
        "state": "UT",
        "zip": "84101"
      }
    }
  }'
```

## Contact Methods

Each contact supports multiple communication methods:

| Method            | Description                    |
| ----------------- | ------------------------------ |
| `phone`           | Phone number (E.164 format)    |
| `phone_hours`     | Business hours for phone       |
| `phone_extension` | Extension number if needed     |
| `fax`             | Fax number                     |
| `email`           | Email address                  |
| `mailing_address` | Full mailing address           |
| `website`         | URL for online portal or forms |
