GET /openapi/memorylake/admin/v1/billing/credit-balance/alert
Permission required:
credits:viewcurl -X GET 'https://app.memorylake.ai/openapi/memorylake/admin/v1/billing/credit-balance/alert' \
-H 'Authorization: Bearer sk_xxxxxx'
Response
object
Show Balance Alert object
Show Balance Alert object
boolean
false = this deployment does not evaluate low-balance alerts at all; the setting is kept but has no effect
boolean
Whether alerts are sent
boolean
true = nothing has been saved; the defaults shown apply (percent_used 80 / 95 with a subscription, otherwise tokens_remaining 1,600,000 / 320,000)
object
object
Current alert state
Show Balance Alert Status object
Show Balance Alert Status object
string
triggered = an alert has fired and the balance has not recovered above its level yet. One of:
ok, triggered.integer
The balance when it fired, in tokens
object
The level that fired
Show Balance Alert Threshold object
Show Balance Alert Threshold object
integer
When the active alert fired, Unix seconds
array
Alert levels; all of one type
Show Balance Alert Threshold object
Show Balance Alert Threshold object
{
"success": true,
"message": "Operation completed successfully",
"data": {
"delivery_enabled": true,
"enabled": true,
"is_default": true,
"notification_channel": {
"recipients": [
"example"
],
"type": "email"
},
"status": {
"state": "ok",
"balance_tokens": 1200000,
"threshold": {
"type": "percent_used",
"value": 1
},
"triggered_at": 1760000000
},
"thresholds": [
{
"type": "percent_used",
"value": 1
}
]
}
}
Errors
Errors answer withsuccess: false, a message and an error_code. See Error Codes for every code.
| Status | Meaning |
|---|---|
401 | The API key is missing, invalid, disabled or expired |
403 | The key is not allowed to do this |
429 | Too many requests. Wait for the time in Retry-After |
500 | Server-side error |