Set the low balance alert
const url = 'https://trongas.ai/api/v1/notifications/balance-alert';const options = { method: 'PUT', headers: {'X-Api-Key': '<X-Api-Key>', 'Content-Type': 'application/json'}, body: '{"enabled":true,"thresholdTrx":1,"emailEnabled":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://trongas.ai/api/v1/notifications/balance-alert \ --header 'Content-Type: application/json' \ --header 'X-Api-Key: <X-Api-Key>' \ --data '{ "enabled": true, "thresholdTrx": 1, "emailEnabled": true }'Required API-key scope: full
Turn the low balance alert on or off and set its threshold in TRX (greater than 0, at most 1,000,000). When a purchase takes your TRX balance below the threshold we alert you right away: an email to your account address (unless emailEnabled is false), an entry in your notifications, and a balance.low webhook event to endpoints subscribed to it. While the balance stays below, every 10th purchase sends a reminder the same way. A purchase that leaves the balance at or above the threshold resets the count. If the balance is already below a newly set threshold, the first alert is the reminder on the 10th purchase.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
object
Responses
Section titled “ Responses ”OK
object
object
Examplegenerated
{ "configured": true, "enabled": true, "thresholdTrx": 1, "emailEnabled": true, "lastTriggeredAt": "2026-04-15T12:00:00Z", "balanceTrx": 1}object
Examplegenerated
{ "configured": true, "enabled": true, "thresholdTrx": 1, "emailEnabled": true, "lastTriggeredAt": "2026-04-15T12:00:00Z", "balanceTrx": 1}Bad Request
object
Machine-readable error code, e.g. wallet.insufficient_balance. Branch on this, not on title. Always present: validation_failed for request validation (400, with per-field errors), unauthorized for 401, domain codes otherwise.
object
Machine-readable error code, e.g. wallet.insufficient_balance. Branch on this, not on title. Always present: validation_failed for request validation (400, with per-field errors), unauthorized for 401, domain codes otherwise.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": "example"}object
Machine-readable error code, e.g. wallet.insufficient_balance. Branch on this, not on title. Always present: validation_failed for request validation (400, with per-field errors), unauthorized for 401, domain codes otherwise.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": "example"}