MonetaryAI / Docs
API ReferenceAccounting settings

Configure account name and enabled status

Defaults to ADMIN/ACCOUNTANT. Send the last-read version as expectedVersion (0 for an unconfigured global account). Creates a company override on first save without modifying global metadata. Disabling is a UI setting, not a ledger posting prohibition. Company permission: `configureCompanyAccount`. 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.

PUT
/api/v1/accounting-settings/{legalEntityId}/accounts/{code}

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
code*string

Request Body

application/json
  1. body
enabled*boolean
expectedVersion*integer

Version last read; stale writes return 409

Formatint64
Range0 <= value
name*string
Length0 <= length <= 200

Response Body

Configuration saved with new version

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 PUT 'https://api.monetaryai.uz/api/v1/accounting-settings/497f6eca-6276-4993-bfeb-53cbbbba6f08/accounts/string' \  -H 'Content-Type: application/json' \  -d '{  "enabled": true,  "expectedVersion": 0,  "name": "string"}'
{  "balanceType": "string",  "code": "string",  "custom": true,  "enabled": true,  "name": "string",  "normalSide": "string",  "subaccountCount": 0,  "type": "ASSET",  "version": 0}