SendaiDocs

API reference

View as Markdown

Balances

Read your prepaid wallet balances programmatically — one row per currency, in the same ten-thousandths unit as charge.

Accounts are prepaid: every send places a hold, and a send your balance will not cover is rejected outright — never half-delivered. A balance is what you hold in one currency; the account carries one row per currency.

The balance object

Attributes

  • idstring (uuid)
    Balance row id.
  • amountinteger
    What you hold, in ten-thousandths of currency — the same unit as charge (10000 == 1.00, so 1250000 == 125.00).
  • currencystring
    Currency of amount.

Rows may carry additional fields (type, active); treat anything beyond the three above as informational.

The balance object
Balance
{
  "id": "5b1c8f2e-3d47-4a09-9c6b-2e8f1a7d4c5e",
  "amount": 1250000,
  "currency": "USD"
}

List balances

GET/api/v1/accounts/{id}/balances

Reads the account's balances, one row per currency, with the same API key as everything else. Check it before a bulk send rather than discovering 422 insufficient balance mid-launch.

This is the endpoint behind the hosted MCP server's get_balance tool — see AI agents.

Path parameters

  • idstring (uuid)required
    Your account id. It is on the key create response as account_id, and on every row of the key listing as AccountId.

Response

Enveloped: data is an array of balance objects.

Errors

StatusWhen
401Missing, malformed, or revoked API key.
RequestGET /api/v1/accounts/{id}/balances
curl https://api.sendai.co.zw/api/v1/accounts/2d6f4b8e-1a90-4e21-8b7d-3f1a5c2e9a0c/balances \
  -H "Authorization: Bearer $SENDAI_API_KEY"
Response
200 OK
{
  "status": "success",
  "message": "request successful",
  "data": [
    {
      "id": "5b1c8f2e-3d47-4a09-9c6b-2e8f1a7d4c5e",
      "amount": 1250000,
      "currency": "USD"
    }
  ]
}