Skip to content

SmsGetProfileBalance

GET sms/providerProfiles/balance

Asks the providers for the account balance behind each profile of the brand, or one profile when id is given.

A prepaid SMS account that runs out stops sending confirmation codes, and nothing else in the system notices. That is why the balance is polled by a cron as well, and a value below [providers] lowBalanceThreshold is flagged in the response and warned about in the log.

Access Control

Allowed role: admin, within the brand of the caller.

Request

GET request
GET https://{broker_domain}/sms/providerProfiles/balance
Authorization: <JWT_TOKEN>
{
  "command": "SmsGetProfileBalance",
  "extID": "1",
  "data": {}
}
const res = await platform.SmsGetProfileBalance({});

Request Data

Field Type Required Description
id int No Check one profile instead of every profile of the brand

Behavior

  • Most SMS providers have no balance API at all. Such a profile answers error: "BALANCE_NOT_SUPPORTED" rather than a zero — a fake zero would either raise a false alarm or hide a real one.
  • A provider that fails to answer is reported with error: "GET_BALANCE_FAILED"; the other profiles are still returned.

Response Data

low lists the profile ids below the threshold — the array a monitor should alert on.

{
  "rows": [
    {
      "profileId": 3,
      "profileName": "Twilio main",
      "provider": "twilio",
      "amount": 42.15,
      "currency": "EUR",
      "low": false,
      "checkedAt": "2026-08-24T14:11:03.118Z",
      "error": null
    },
    {
      "profileId": 5,
      "profileName": "Infobip personal",
      "provider": "infobip",
      "amount": null,
      "currency": null,
      "low": false,
      "checkedAt": "2026-08-24T14:11:03.402Z",
      "error": "BALANCE_NOT_SUPPORTED"
    }
  ],
  "threshold": 10,
  "low": []
}

Errors

Code Error Description
404 NOT_FOUND Profile not found in the brand