Create Ledger Account

post/ledger_accounts

Request

  • Base URL
    https://app.moderntreasury.com/api
  • URL
    https://app.moderntreasury.com/api/ledger_accounts
  • Auth
    HTTP basic

Request body

namestring required

The name of the ledger account. Maximum of 1000 characters allowed.

descriptionstring

An optional free-form description for internal use. Maximum of 1000 characters allowed.

currencystring required
currency_exponentinteger

Must be included if currency is a custom currency. The currency_exponent cannot exceed 30.

normal_balancestring required

One of credit, debit

ledger_idstring required
ledgerable_idstring

The id of linked ledgerable

ledgerable_typestring

The type of linked ledgerable. See Ledger Accounts for list of types

metadatastring json

Metadata to be added to the ledger account. Must be a JSON object.

ledger_account_category_idsstring[]

The array of parent ledger account category IDs to which this ledger account will be associated on creation. This is performed atomically, and all associations must be valid and succeed for the ledger account to be successfully created.

external_idstring

An optional user-defined 180 character unique identifier

Response

201

idstring
objectstring
live_modeboolean
namestring
ledger_idstring
descriptionunknown
lock_versioninteger
normal_balancestring
metadataobject
discarded_atunknown
created_atstring
updated_atstring

Example response

{
  "id": "690eed62-5b6c-45ee-a474-f54905133866",
  "object": "ledger_account",
  "name": "Operating Bank Account",
  "ledger_id": "fe96565f-4b9c-4871-8fb0-e6f02683458e",
  "normal_balance": "debit",
  "balances": {
    "pending_balance": {
      "currency": "USD",
      "currency_exponent": 2
    },
    "posted_balance": {
      "currency": "USD",
      "currency_exponent": 2
    },
    "available_balance": {
      "currency": "USD",
      "currency_exponent": 2
    }
  },
  "created_at": "2022-11-01T20:57:31Z",
  "updated_at": "2022-11-01T20:57:31Z"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.