Create a Ledger Account Balance Monitor

How to create a ledger account balance monitor

Ledger account balance monitors can be created by calling our create ledger account balance monitor endpoint. For example, to create a balance monitor which sends a webhook when the available balance of the account goes below 0, the following request can be made:

curl --request POST \ --url https://app.moderntreasury.com/api/ledger_account_balance_monitors \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data ' { "alert_condition": { "field": "available_balance_amount", "condition": "less_than", "value": 0 }, "description": "Available balance went below 0", "ledger_account_id": "78fa571-fe0e-97b2-4228-ccc79018db8e9", "metadata": {} } '