Chart of accounts

Update a chart of account

Changes the fields you send on one of the company's own accounts. MagicDoor's built-in accounts cannot be updated. Requires the chart_of_accounts:write permission.

PATCH
https://services.magicdoor.com/accounting/company-portal/chart-of-accounts/{chartOfAccountId}

Authorization

Authorizationstringrequired
Bearer token — Send your API token in the Authorization header as Bearer <token>. Requests without a valid token are rejected with 401 Unauthorized.

Path parameters

chartOfAccountIdstringrequired

Id of the chart-of-account entry: a Snowflake for a company account, or the six-digit number for one of MagicDoor's built-in accounts.

example: 1830472847398404097

Body

application/json

Only the fields present in the body are applied. There is no way to clear parentId, number or description through this endpoint — omitting a field leaves it as it was. type cannot be changed at all.

namestring

Display name, 1 to 200 characters.

numberinteger

A new account number between 100000 and 899999, not already taken.

descriptionstring

Free-text note, up to 500 characters.

parentIdstring

Move the account under a different parent. The parent must have the same type and must not be the account itself or one of its own descendants.

Response

200 · The account after the change. Sending a body with no fields returns it unchanged.

idstring

Identifier 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.

parentIdstring

The account this one rolls up into. Absent for a top-level account. A parent always has the same type.

numberinteger

The 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.

assetequityliabilityrevenueexpenseotherRevenueotherExpense
namestring

What property managers see in account pickers, for example "Landscaping".

descriptionstring

Free-text note. Absent when none was set.

createdstring · date-time

When 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-time

When the account was last changed, with the same wall-clock-plus-artefact-offset shape as created.

creatorobject

Who 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.

400 · A field failed validation, or the new parent is the account itself or one of its descendants.

401 · The access token is missing, expired, or not for this company.

403 · The caller does not hold the `chart_of_accounts:write` permission.

404 · The account is not visible to this company, or the new `parentId` names no visible account.

409 · The resulting `name`, `type` and `parentId` match another account, or the `number` is already taken.

422 · The account is one of MagicDoor's built-in accounts, or the new parent has a different `type`.