Create wallet alert(s)
Changed onThis endpoint allows you to create new alerts for a wallet. Send a single alert object wrapped in alert key to create one alert, or an array of alert objects wrapped in alerts key to create multiple alerts atomically.
Request
- Base URLhttps://api.getlago.com/api/v1
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"alert": {
"code": "wallet_balance_alert",
"name": "Wallet Balance Alert",
"thresholds": [
{
"code": "warn",
"notify_on": [
"triggered",
"resolved"
]
}
],
"alert_type": "wallet_balance_amount"
}
}Response
Wallet alert(s) created
Example response
{
"alert": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_organization_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_wallet_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"wallet_code": "wallet_code",
"alert_type": "wallet_balance_amount",
"code": "wallet_balance_alert",
"name": "Wallet Balance Alert",
"direction": "decreasing",
"previous_value": "1000.0",
"last_processed_at": "2025-05-19T10:04:21Z",
"thresholds": [
{
"code": "warn",
"notify_on": [
"triggered",
"resolved"
],
"value": "99.0"
}
],
"created_at": "2025-03-20T10:00:00Z"
}
}Changes
- breaking
request property
/////////////list-of-types was narrowed by removing typesintegerfrom media typeapplication/json - breaking
request property
////////////list-of-types was narrowed by removing typesintegerfrom media typeapplication/json - breaking
the
/////response's property type changed fromnumbertostringfor status - breaking
the
//////response's property type changed fromnumbertostringfor status - info
added the new optional request property
//////////////// - info
added the new optional request property
/////////////// - info
the
//////////////request property type was generalized fromintegertonumber - info
the
/////////////request property type was generalized fromintegertonumber - info
added the optional property
///////////to the response with the status - info
added the optional property
////////////to the response with the status - info
the response property
/////became required for the status - info
the response property
/////became required for the status - info
the response property
/////became required for the status - info
the response property
//////became required for the status - info
the response property
//////became required for the status - info
the response property
//////became required for the status - info
the
////////response's property pattern was changed from^[0-9]+.?[0-9]*$to^-?[0-9]+(\.[0-9]+)?$for the status - info
the
/////////response's property pattern was changed from^[0-9]+.?[0-9]*$to^-?[0-9]+(\.[0-9]+)?$for the status
- breaking