v45

latestOpenAPI 3.0.0raw.githubusercontent.com2026-07-2684278289.5 KB
Books

Create a Ledger Template

Create a new ledger within an agent-owned Chart of Accounts template.

post/books/agent-ledger-templates

Request body

coaTemplateIdstring base58 (max length 22) required

The COA Template Id.

debitCredit'debit' | 'credit' required

Whether the ledger has a debit or credit normal balance

editableboolean required

Whether line entries can be manually added or removed from the ledger.

financialAccountType'bankAccount' | 'creditCard' | 'payments' | 'payroll' | 'loan' | 'prepaidCard' | 'accountsReceivable' | 'accountsPayable' | 'investment' | 'treasury' required

The financial account type for this ledger

ledgerSubType'currentAssets' | 'nonCurrentAssets' | 'transfersBetweenAccounts' | 'uncategorizedAssets' | 'currentLiabilities' | 'nonCurrentLiabilities' | 'equity' | 'operatingRevenues' | 'otherIncome' | 'costOfGoodsSold' | 'operatingExpenses' | 'otherExpenses' | 'retainedEarnings' required

The sub-type of the ledger

ledgerType'asset' | 'liability' | 'equity' | 'revenue' | 'expense' required

The type of ledger (asset, liability, equity, revenue, expense)

namestring required

The name of the ledger.

parentIdstring base58 (max length 22) nullable

If the ledger is a child Ledger, the ID of the parent ledger object.

reportCashFlowboolean required

Whether Teal includes this ledger in the cash flow report.

sortCodestring matches ^[0-9]+$, size < 21 required

Determines the display order in reports, ordered digit by digit.

Example request

{
  "coaTemplateId": "7JRNsKwy2Lw66caxVU7WGC",
  "parentId": "7JRNsKwy2Lw66caxVU7WGC"
}

Response