Chart of Accounts

Creates a chart of accounts

Changed on

Initializes the entire chart of accounts for a bare organization in one atomic call. The organization must have no existing chart of accounts; otherwise the request fails with 409. The complete request is validated before any accounts or groups are created; validation failures return 400 without leaving a partial chart of accounts.

Structural invariants match CSV import: exactly one Accounts Receivable, Accounts Payable, Sales Tax Liability, and Retained Earnings; at least one Unbilled Revenue, Prepaid Expense, and Deferred Revenue. The same default group scaffold as CSV import is created. Each account's optional parent_grouping reuses a scaffold group by name or creates a nested group under the account type root. When the request contains exactly one Prepaid Expense account, expense accounts may omit prepaid_account_code to default to it; when it contains multiple Prepaid Expense accounts, each expense account must reference one by code. Cash in Transit is auto-created and must not appear in the request.

post/chart-of-accounts

Request

Request body

Example request

{
  "accounts": [
    {
      "name": "My New Account",
      "code": "90909"
    }
  ]
}

Response

OK

Example response

{
  "accounts": [
    {
      "code": "11112",
      "name": "Mercury Savings",
      "subtype": "Bank"
    }
  ]
}

Changes