MonetaryAI / Docs
API ReferenceAccounting settings

Add a company account

Creates company metadata with a four-digit code that must not already exist in the global or company chart. Does not register a global ledger posting code. Defaults to ADMIN/ACCOUNTANT; mutation and actor audit commit together. Company permission: `createCompanyAccount`. Defaults: ADMIN, ACCOUNTANT. Current company role permissions and active membership are checked on every request; signed legacy role claims alone do not authorize this operation.

POST
/api/v1/accounting-settings/{legalEntityId}/accounts

Authorization

bearerAuth
headerAuthorizationBearer <token>

Obtained from POST /api/v1/auth/login, on the tenant's own subdomain. Presenting it on another tenant's subdomain is a 403.

Path Parameters

legalEntityId*string
Formatuuid

Request Body

application/json
  1. body
code*string
Match^[0-9]{4}$
Length1 <= length
enabled*boolean
name*string
Length0 <= length <= 200
type*string
Value in"ASSET""CONTRA_ASSET""LIABILITY""EQUITY""INCOME""EXPENSE"

Response Body

Company account created

application/json
  1. response
balanceType?string
code?string
custom?boolean
enabled?boolean
name?string
normalSide?string
subaccountCount?integer
Formatint64
type?string
Value in"ASSET""CONTRA_ASSET""LIABILITY""EQUITY""INCOME""EXPENSE"
version?integer

0 for an unconfigured global account; send as expectedVersion when configuring

Formatint64
curl -X POST 'https://api.monetaryai.uz/api/v1/accounting-settings/497f6eca-6276-4993-bfeb-53cbbbba6f08/accounts' \  -H 'Content-Type: application/json' \  -d '{  "code": "string",  "enabled": true,  "name": "string",  "type": "ASSET"}'
{  "balanceType": "string",  "code": "string",  "custom": true,  "enabled": true,  "name": "string",  "normalSide": "string",  "subaccountCount": 0,  "type": "ASSET",  "version": 0}