Add a chart account
add_chart_accountAdds a new account to the org chart. You pick the TYPE and NAME; the system auto-assigns the next free code in that type's range (income 4xxx, cogs 5xxx, opex 6xxx, asset 1xxx, liability 2xxx, equity 3xxx), never reusing a retired code, and sets the correct P&L rollup. If QuickBooks is connected the account is provisioned there immediately (provisioning_status active); otherwise it is created locally and stays pending until the next QuickBooks connect. The account is usable for categorisation right away. actor_id is optional — it defaults to the organisation entity.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The account display name, e.g. "Travel & Meals". | |
| type | Yes | The account type: income, cogs (cost of goods), opex (operating expense), asset, liability, or equity. Determines the code range and the P&L rollup. | |
| org_id | No | Optional. Defaults to the organisation the authenticated API key is bound to, so you normally omit it and never need to ask the user for their organisation UUID. If provided, it must match the key’s org or the request is rejected. | 0e91146d-511c-469f-bdee-5c867b26ae0d |
| reason | Yes | Why this account is needed. Stored verbatim in the audit trail. | |
| actor_id | No | Optional. Defaults to the organisation entity (correct for an org-scoped key). If provided, it must be an entity belonging to this organisation — arbitrary UUIDs are rejected, so the audit trail cannot be attributed to someone else. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes |