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

# Accounts

> List, create, update, close, and delete bank accounts

Accounts hold transactions and balances. Accounts created through the API are always manual (unlinked) accounts; accounts connected to a bank feed appear with `"linked": true` and cannot be created or deleted via the API.

## The account object

```json theme={null}
{
  "id": "k4859a...",
  "name": "Chase Checking",
  "type": "banking_checking",
  "on_budget": true,
  "balance": "1520.75",
  "cleared_balance": "1480.75",
  "pending_balance": "40.00",
  "closed": false,
  "notes": null,
  "linked": false,
  "last_reconciled_at": null,
  "created_at": "2026-01-12T15:04:05.000Z",
  "updated_at": "2026-07-01T09:30:00.000Z"
}
```

`on_budget` is `true` for banking and credit accounts (they participate in envelope budgeting) and `false` for investment and loan accounts.

## List accounts

```text theme={null}
GET /v1/workspaces/{workspace_id}/accounts
```

| Query parameter  | Type    | Description                               |
| ---------------- | ------- | ----------------------------------------- |
| `include_closed` | boolean | Include closed accounts. Default `false`. |

## Get an account

```text theme={null}
GET /v1/workspaces/{workspace_id}/accounts/{account_id}
```

## Create an account

```text theme={null}
POST /v1/workspaces/{workspace_id}/accounts
```

```bash theme={null}
curl -X POST https://api.kualia.com/v1/workspaces/WORKSPACE_ID/accounts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Emergency Fund",
    "type": "banking_savings",
    "initial_balance": "5000.00",
    "initial_balance_date": "2026-07-01"
  }'
```

| Field                  | Type   | Required | Description                                                    |
| ---------------------- | ------ | -------- | -------------------------------------------------------------- |
| `name`                 | string | yes      | Display name                                                   |
| `type`                 | string | yes      | Account type (see below)                                       |
| `initial_balance`      | string | no       | Starting balance as a decimal string                           |
| `initial_balance_date` | string | no       | Date of the starting balance (`YYYY-MM-DD`, defaults to today) |

**Account types** — `banking_checking`, `banking_savings`, `banking_cash`, `banking_cash_management`, `banking_money_market`, `banking_cd`, `banking_other`, `credit_credit_card`, `credit_line_of_credit`, `credit_other`, `investment_brokerage`, `investment_401k`, `investment_ira`, `investment_roth_ira`, `investment_roth_401k`, `investment_hsa`, `investment_sep_ira`, `investment_simple_ira`, `investment_keogh`, `investment_529_plan`, `investment_403b`, `investment_other`, `loan_auto`, `loan_business`, `loan_commercial`, `loan_construction`, `loan_home_equity`, `loan_mortgage`, `loan_student`, `loan_other`.

## Update an account

```text theme={null}
PATCH /v1/workspaces/{workspace_id}/accounts/{account_id}
```

| Field    | Type    | Description                                                                                   |
| -------- | ------- | --------------------------------------------------------------------------------------------- |
| `name`   | string  | Rename the account                                                                            |
| `notes`  | string  | Set the account notes                                                                         |
| `closed` | boolean | `true` closes the account (reconciles its cleared transactions), `false` reopens a closed one |

## Delete an account

```text theme={null}
DELETE /v1/workspaces/{workspace_id}/accounts/{account_id}
```

Only accounts with no active transactions can be deleted — otherwise the request fails with `400`. Close the account instead if it has history you want to keep.
