MailerGetProfileBalance¶
GET mailer/providerProfiles/balance
Asks the providers for the account quota or balance behind each profile of the brand, or one
profile when id is given.
An account that runs out of quota stops sending confirmation codes, and nothing else in the
system notices. That is why the value is also polled by a cron, and anything below
[providers] lowBalanceThreshold is flagged here and warned about in the log.
Access Control¶
Allowed role: admin, within the brand of the caller.
Request¶
GET request
GET https://{broker_domain}/mailer/providerProfiles/balance
Authorization: <JWT_TOKEN>
{
"command": "MailerGetProfileBalance",
"extID": "1",
"data": {}
}
const res = await platform.MailerGetProfileBalance({});
Request Data¶
| Field | Type | Required | Description |
|---|---|---|---|
id |
int | No | Check one profile instead of every profile of the brand |
Behavior¶
- Most email providers expose no balance API at all; SES reports a sending quota instead. 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 an error while 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": 4,
"profileName": "Amazon SES",
"provider": "ses",
"amount": 48200,
"currency": "EMAILS_PER_DAY",
"low": false,
"checkedAt": "2026-08-24T14:11:03.118Z",
"error": null
},
{
"profileId": 3,
"profileName": "Postmark transactional",
"provider": "postmark",
"amount": null,
"currency": null,
"low": false,
"checkedAt": "2026-08-24T14:11:03.402Z",
"error": "BALANCE_NOT_SUPPORTED"
}
],
"threshold": 1000,
"low": []
}
Errors¶
| Code | Error | Description |
|---|---|---|
404 |
NOT_FOUND |
Profile not found in the brand |