getAccountBalance
Read your organization's wallet balance, plan, and auto-recharge state, including minutes available and concurrency headroom, to catch low credit before calls fail with a payment error.
Instructions
Read your organization's wallet balance, plan and auto-recharge state.
The response also has the minutes the balance buys at your rates and your concurrency headroom.
Call it before a campaign, or on a schedule, so you learn about low credit
here and not from a call failing with 402 payment_required.
The response always describes the organization the API key belongs to. There is no parameter for another account. Resellers read a client's figures through the Reseller endpoints.
A balance at or below zero does not always stop calls. An organization on
usage-based billing (plan.is_usage_based) keeps placing calls and is
metered to its payment method. Check that flag before treating zero as a
stop condition.
The API key's user needs Billing access in your organization. If you get a
403, an administrator can grant it when Billing is enabled for your
organization. When it is not, contact support.
(Tags: Account)
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "getAccountBalance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||