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

# How to Create and Manage Chart of Accounts

> Create accounts, build a parent-child hierarchy, manage accounts across entities, renumber accounts, and merge duplicate accounts in DualEntry.

Use this guide to create accounts, structure them into a parent-child hierarchy, manage them across entities, renumber them, and merge duplicates. For field definitions, numbering ranges, and what changes DualEntry allows after an account has posted activity, see [Chart of Accounts: Reference](./chart-of-accounts).

## Prerequisites

* A DualEntry role with permission to manage the chart of accounts. See [User Roles and Permissions](../../platform-configuration/user-roles-and-permissions) if you're not sure which roles have it.
* For a merge or a renumber, decide on the target account or new number in advance. Both are described below, and neither can be undone once confirmed.

## Create an account

To create an account, navigate to **Configuration → Accounting Setup → Chart of Accounts** or use the API. See [account fields](./chart-of-accounts#account-fields) for what each field means and which are required.

To create an account via the API, send a `POST` to `/public/v2/accounts/` with these fields in the request body.

The following example creates a top-level operating expense account:

```http theme={null}
POST /public/v2/accounts/
Content-Type: application/json

{
  "name": "Office Supplies",
  "number": 6100,
  "account_type": "expense",
  "parent_account_id": null,
  "is_active": true,
  "currency_iso_4217_code": null
}
```

<Warning>
  Neither the account form nor the `PATCH` endpoint changes an account number once transactions have posted to it. Use [Renumber an account](#renumber-an-account) instead.
</Warning>

## Create a child account

To make an account a child, set its **Parent Account** field to an existing account of the same type. See [parent-child hierarchy](./chart-of-accounts#parent-child-hierarchy) for the concept and how deep a chain can go before you plan the grouping.

From the UI, open **Configuration → Accounting Setup → Chart of Accounts** (or edit an existing account) and choose the parent from the dropdown. Via the API, pass `parent_account_id` when calling `POST /public/v2/accounts/`:

```http theme={null}
POST /public/v2/accounts/
Content-Type: application/json

{
  "name": "Paid Advertising",
  "number": 6010,
  "account_type": "expense",
  "parent_account_id": 142,
  "is_active": true,
  "currency_iso_4217_code": null
}
```

Set `parent_account_id` to `null` for a top-level account. To convert a child back into a top-level account, `PATCH` the account with `parent_account_id: null`.

Plan the grouping before creating the children. You cannot assign a parent to an account whose type differs from the parent's, and you cannot change an account's type once it has children or posted activity.

## Manage accounts across multiple entities

In a multi-entity setup, DualEntry shares the chart of accounts across all companies by default. This means account `6100 - Office Supplies` exists in every entity's ledger, which simplifies consolidated reporting.

If an account should only appear for a specific entity, restrict it using the account's entity scope setting under **Configuration → Accounting Setup → Chart of Accounts**. Scoped accounts are hidden from journal entry dropdowns for entities they don't belong to. When adding a new account in a multi-entity environment, decide whether it applies globally or to a subset of entities before saving. Changing scope after transactions have posted requires moving those transactions first.

For consolidated financial statements, the shared chart of accounts structure ensures that accounts roll up consistently across entities. If you need entity-specific detail without separate accounts, use [classifications](./journal-entries#line-fields) to tag transactions by entity, department, or location and report on them through dimension-filtered views.

## Renumber an account

To change an account's number after it has posted activity, use the Account Renumbers bulk import rather than the account form or `PATCH` endpoint, both of which block that change once transactions exist.

1. Go to **Workflows → Bulk Imports** and choose the Account Renumbers import.
2. Provide two columns: the account's current number and its new number.
3. Run the import.

The import changes the number in place: existing entries stay attached to the account, and reporting history follows the new number, so you don't create a replacement account or reclassify entries. The import rejects a row when the account doesn't exist, the new number isn't an integer, it matches the current number, or it's already in use by another account.

## Merge two accounts

If you end up with duplicate or overlapping accounts (for example, two "Office Supplies" accounts created during a migration), you can merge them instead of manually re-coding every historical entry. Merging combines a **source** account into a **target** account: DualEntry re-points all posted activity, item mappings, bank and credit card references, budgets, allocation rules, fixed asset mappings, and reconciliation history to the target, then deletes the source account.

To merge accounts, navigate to **Configuration → Accounting Setup → Chart of Accounts**, choose the source account, and choose **Merge into another account**. Choose the target account and confirm. DualEntry runs the merge as a single audited transaction and records it in the audit log against the target account (event type `ACCOUNT_MERGED`), capturing both the source and target account numbers and names.

### Requirements

Both accounts must satisfy every rule below before a merge is allowed:

* Both accounts belong to the same organization.
* Both accounts have the same **account type** (Asset, Liability, Equity, Revenue, or Expense).
* Both accounts have the same **1099 category**.
* Neither account has a linked financial account (connected bank feed).
* The source account is not a system account.
* The source account has no child accounts.
* The target account is not a child of the source account.
* If both accounts have budget cells, no cells overlap for the same budget, year, and month.
* No entry on the source account falls in a locked AR, AP, or GL period for the target account's company.

Bank accounts and credit card accounts cannot be merged from the UI. If you need to consolidate them, contact support.

### What happens during a merge

DualEntry processes the merge as a single transaction and blocks concurrent edits to either account until it completes. It updates every reference to the source account, including:

* GL entries and every record line type (journal entries, bill lines, direct expense lines, customer and vendor payment lines, allocation lines, currency revaluation lines)
* Item mappings (income, expense, deferral, asset, and discount accounts)
* Fixed asset, amortizable asset, disposal, and revaluation account fields
* Bank and credit card account fields on payments, deposits, refunds, transfers, cash sales, and direct expenses
* Reconciliations, allocation schedules and templates, contracts, budgets, and integration records
* Parent-account pointers on any child accounts

Once every reference is updated, DualEntry deletes the source account and releases the lock.

Merges cannot be undone. Confirm that the target account's number, name, `account_type`, and default classifications are correct before merging, because historical entries inherit them going forward. For very large accounts, the merge may exceed the request timeout; in that case, use [bulk reclassification](../../ai-automation/bulk-update-and-reclass) or bulk import to consolidate the data instead.

## Verify

* The account appears in **Configuration → Accounting Setup → Chart of Accounts**, with the number, type, and parent you set.
* A child account rolls up into its parent's subtotal on reports, and the parent's own balance stays separate.
* After a renumber, the account's history and reporting still show under the new number.
* After a merge, the source account no longer appears in the chart of accounts, and its historical activity shows under the target account's number.

## Troubleshooting

| What you see                                                                  | What to do                                                                                                                                                                                                                         |
| ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Max nesting of accounts is 5` on save                                        | The branch you're re-parenting into already runs five levels deep. See [how deep the hierarchy can go](./chart-of-accounts#how-deep-the-hierarchy-can-go); the check counts the whole branch, not just the account you're editing. |
| The account number field won't accept a change                                | The account has posted activity. Use [Renumber an account](#renumber-an-account) instead of the account form or `PATCH`.                                                                                                           |
| **Merge into another account** isn't available, or the merge fails validation | One of the [merge requirements](#requirements) isn't met. Check account type, 1099 category, linked bank feeds, and locked periods on both accounts.                                                                               |
| An account is missing from a journal entry's dropdown in one entity           | The account's company scope excludes that entity. See [Manage accounts across multiple entities](#manage-accounts-across-multiple-entities).                                                                                       |
| An account's type or company scope won't change                               | Both are blocked once the account has posted activity; move or reclassify the entries first.                                                                                                                                       |
| An Account Renumbers import row is rejected                                   | The account doesn't exist, the new number isn't an integer, it matches the current number, or it's already in use by another account.                                                                                              |

## Related reading

* [Chart of Accounts: Reference](./chart-of-accounts)
* [How to Set Up Statistical Accounts](./statistical-accounts)
* [Journal Entries: Reference](./journal-entries)
* [Bulk Import: Load Records from a File](../../integrations/automation-and-developer-tools/bulk-import)
