v1

latestOpenAPI 3.1.02026-08-04103211436.0 KB
AccountingAccounts

Create accounting account

Creates an accounting account identified by accountingCode. If an account with the same accountingCode already exists, this call updates it instead of failing; if the submitted data is identical to the existing account, the call is a no-op. accountingName defaults to accountingCode when omitted. type is inferred from accountingCode when not sent, and an accountingCode starting with 572 is always classified as banks on creation regardless of the type sent — see the type field description. Once an account exists, type cannot be changed through this endpoint: any type sent for an existing account (including the 572 override) is silently ignored and only applies when the account is first created — use the update endpoints to change it. Recreating a previously deleted (deactivated) account does not reactivate it unless active: true is explicitly sent. Entries in attributes with an empty or missing customId or value are silently discarded.

post/accountingaccounts/{companyId}

Path parameters

companyIdstring required

Request body

activeboolean nullable

Whether the accounting account is active.

type'banks' | 'analytics' | 'accountings'
accountingNamestring nullable

Display name of the accounting account. Defaults to accountingCode when omitted.

collectiveboolean nullable

Whether this is a collective (grouping) accounting account rather than an individual one.

additionalInfoobject nullable

Free-form key/value metadata to attach to the account. Sending an empty object leaves any previously stored metadata unchanged instead of clearing it.

accountingCodestring required

Unique code identifying the accounting account in the company's chart of accounts.

Example request

{
  "accountingName": "Clients - Domestic",
  "attributes": [
    {
      "customId": "cost-center",
      "value": "Marketing",
      "valueCustomId": "cc-marketing"
    }
  ],
  "accountingCode": "430001"
}

Response

Successful Response

idstring required

Embat resource ID

accountingCodestring required

Client-provided accounting code.

Example response

{
  "accountingCode": "430001"
}