Update Billing Alert

PUT/v1/billing/alert

Updates the current low balance alert settings for the authenticated account.

Authentication

Authorization Bearer

Send an API key (sk-...) in the Authorization header.

Request Body

request_schema
1[
2  { "name": "enabled", "type": "boolean", "required": true, "description": "Whether low balance warning emails are enabled." },
3  { "name": "threshold", "type": "number", "required": false, "description": "Low balance threshold in USD. When provided, it must be greater than 0." }
4]

Response

codeinteger

Response status code.

dataobject

Updated low balance alert settings.

data.coupon_availablenumber

Available coupon / credit balance.

data.total_spendablenumber

Current spendable balance.

data.enabledboolean

Whether low balance warning emails are enabled.

data.last_notified_atstring | null

Last notification time.

data.last_recovered_atstring | null

Last recovery time after balance moved back above threshold.

data.thresholdnumber

Alert threshold in USD.

data.wallet_availablenumber

Available wallet balance.

Error Handling

  • 401 / unauthenticated: missing or invalid Authorization.
  • Validation error: enabled is required; threshold must be greater than 0 when present.
  • Enterprise member accounts cannot use wallet alert APIs directly.

Request

Shell
1curl -sS -X PUT "https://api.token360.ai/v1/billing/alert" \
2  -H "Authorization: Bearer sk-your-api-key" \
3  -H "Content-Type: application/json" \
4  -d '{"enabled":false,"threshold":50}'

Response

JSON
1{
2  "code": 200,
3  "data": {
4    "coupon_available": 0e-10,
5    "total_spendable": 125.5,
6    "enabled": false,
7    "last_notified_at": null,
8    "last_recovered_at": null,
9    "threshold": 50.0,
10    "wallet_available": 125.5
11  },
12  "msg": "success",
13  "service_code": null,
14  "trace_id": "trace_example_123"
15}
Was this page helpful?