Create a chart of account
Adds an account to the company's chart of accounts and returns it. Leave number out and the next free number in the band for type is assigned. Requires the chart_of_accounts:write permission.
Authorization
AuthorizationstringrequiredBody
application/json
The combination of name, type and parentId must be unique within the company, comparing names case-insensitively.
typeenum<string>requiredWhich side of the books the account sits on. It cannot be changed afterwards.
namestringrequiredDisplay name, 1 to 200 characters.
numberintegerThe account number to use, between 100000 and 899999. Must not already be taken by a company account or a built-in one. Omit it and MagicDoor picks the next free number in the band for type.
descriptionstringFree-text note, up to 500 characters.
parentIdstringId of the account this one rolls up into. It must be visible to the company and have the same type.
Response
200 · The account that was created.
idstringIdentifier of the account. Accounts the company created have a Snowflake id; MagicDoor's built-in accounts have the six-digit account number as their id, so "110000" is both the id and the number of the built-in Cash account.
parentIdstringThe account this one rolls up into. Absent for a top-level account. A parent always has the same type.
numberintegerThe account number. The leading digit places it in a band: 1xxxxx asset, 2xxxxx liability, 3xxxxx equity, 4xxxxx revenue, 6xxxxx expense, 7xxxxx other revenue, 8xxxxx other expense.
typeenum<string>Which side of the books the account sits on. Fixed at creation — no endpoint changes it.
namestringWhat property managers see in account pickers, for example "Landscaping".
descriptionstringFree-text note. Absent when none was set.
createdstring · date-timeWhen the account was created, as a wall clock in the company's timezone. This field carries a UTC offset suffix; the offset is an artefact of how the value is serialised, so read the wall clock and ignore it.
updatedstring · date-timeWhen the account was last changed, with the same wall-clock-plus-artefact-offset shape as created.
creatorobjectWho last touched the account. MagicDoor's built-in accounts always report system. Deprecated mirrors of id — propertyManagerId, tenantId, vendorId, ownerId — are also present, whichever matches type.