Skip to main content
PUT
/
balance-monitors
/
:id
{
  "balance_id": "bln_0987654321",
  "condition": {
    "field": "balance",
    "operator": "<",
    "value": 50.00,
    "precision": 100
  },
  "description": "Updated low balance threshold",
  "call_back_url": "https://api.example.com/webhooks/low-balance"
}
{
  "message": "BalanceMonitor updated successfully"
}
Update the configuration of an existing balance monitor. This allows you to change the alert conditions, webhook URL, or other settings without deleting and recreating the monitor.

Path Parameters

id
string
required
The unique identifier of the balance monitor to update

Request Body

balance_id
string
The ID of the balance to monitor (cannot be changed after creation)
condition
object
The updated alert condition
description
string
Optional description of the monitor
call_back_url
string
The webhook URL to call when the condition is met

Response

Returns a success message when the monitor is updated successfully.
message
string
Confirmation message indicating successful update
{
  "balance_id": "bln_0987654321",
  "condition": {
    "field": "balance",
    "operator": "<",
    "value": 50.00,
    "precision": 100
  },
  "description": "Updated low balance threshold",
  "call_back_url": "https://api.example.com/webhooks/low-balance"
}
{
  "message": "BalanceMonitor updated successfully"
}

Use Cases

Adjust Alert Thresholds

Modify warning levels based on changing business requirements or account behavior.

Update Webhook Endpoints

Change the destination URL for alerts without disrupting monitoring.

Refine Conditions

Switch operators or monitored fields to better match your alerting needs.

Seasonal Adjustments

Update thresholds for seasonal business patterns or promotional periods.

Important Notes

  • The monitor ID in the URL path cannot be changed
  • All fields in the request body are applied to the monitor (partial updates require sending the complete object)
  • The balance_id should remain consistent with the original monitor configuration
  • Updates take effect immediately and apply to subsequent transactions
  • Monitor cache is invalidated on update to ensure immediate application
  • Consider the precision value when updating thresholds to ensure accurate comparisons

Best Practices

  1. Always include precision: Ensure the precision value matches your balance’s currency precision
  2. Test webhook URLs: Verify your webhook endpoint is accessible before updating
  3. Document changes: Use the description field to track why thresholds were changed
  4. Gradual adjustments: When lowering alert thresholds, do so gradually to avoid alert fatigue
  5. Monitor after updates: Watch for alerts after updating to ensure conditions work as expected

Build docs developers (and LLMs) love