Skip to content

Set the low balance alert

PUT
/api/v1/notifications/balance-alert
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.

object
enabled
required
boolean
thresholdTrx
required
number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?$/
emailEnabled
boolean
default: true

OK

object
configured
required
boolean
enabled
required
boolean
thresholdTrx
required
number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?$/
emailEnabled
required
boolean
lastTriggeredAt
required
null | string format: date-time
balanceTrx
required
number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?$/

Bad Request

object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string
code

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.

null | string