Create ledger

POST/api/v1/ledgers

Create a new account in the chart of accounts.

Operation ID: create_ledger_api_v1_ledgers_post·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

namestringrequired

Ledger name (e.g., 'Operating Cash', 'Sales Revenue').

currencystring

Currency for this account (USD, CAD, AUD, EUR, or GBP). Defaults to business default.

editableboolean

Whether journal entries can be manually posted to this account.

typestring

Account type: asset, liability, equity, revenue, expense. Required in Custom Mode.

descriptionstring

Optional description of the account's purpose.

account_numberstring

Optional account number/code for chart-of-accounts numbering.

statusstring

Account status: 'active' or 'inactive'. Inactive accounts hidden from dropdowns.

debit_creditstring

Normal balance: 'debit' (assets/expenses) or 'credit' (liabilities/equity/revenue). Required in Custom Mode.

sort_codeinteger

Sort code for chart ordering (e.g. 1000 for assets, 4000 for revenue). Required in Custom Mode.

sub_typestring

Sub-classification (current_assets, operating_expenses, etc.). Required in Custom Mode.

report_cash_flowboolean

Include in cash flow statement. Required in Custom Mode.

financial_account_typestring

Templated Mode: bank_account, credit_card, payments, payroll, loan, prepaid_card, accounts_receivable, accounts_payable.

parent_idstring

UUID of parent ledger for sub-accounts (e.g., 'Operating Expenses' → 'Office Supplies').

cash_flow_sectionCashFlowSectionEnum

Cash flow statement section (local-only on Teal businesses).

cfs_classCashFlowClassEnum

Indirect-method cash flow classification. Determines which row of the Statement of Cash Flows this account populates. If omitted, the system derives it from type/sub_type/financial_account_type on first save; un-derivable rows must be set explicitly to pass cash-flow validation.

Responses

201Successful Response

successboolean
messagestring
codestring
dataLedgerResponse

400Bad Request - Invalid input

401Unauthorized - Authentication required

403Forbidden - Insufficient permissions

422Validation Error

detailarray · ValidationErrorValidationError
5 fields
locarray · string | integerrequired
msgstringrequired
typestringrequired
inputobject
ctxobject