Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.redbark.co/llms.txt

Use this file to discover all available pages before exploring further.

The REST API is in beta. This endpoint’s response shape may change.
Returns live balances for the specified accounts. Balances are fetched directly from the banking provider on each request. No balance data is stored on Redbark servers.

Request

GET /v1/balances

Headers

HeaderRequiredDescription
AuthorizationYesBearer YOUR_API_KEY

Query parameters

ParameterTypeRequiredDescription
accountIdsstringYesComma-separated list of account UUIDs (max 100)
Use the List Accounts endpoint to get account IDs.

Response

Balances are cached at the edge for 5 minutes per key+accountId set. Returned in the order the provider responds — not guaranteed to match the input order.
{
  "data": [
    {
      "accountId": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890",
      "currentBalance": "1234.56",
      "availableBalance": "1200.00",
      "currency": "AUD"
    },
    {
      "accountId": "b2c3d4e5-f6a7-8901-b2c3-d4e5f6a78901",
      "currentBalance": "8750.00",
      "availableBalance": "8750.00",
      "currency": "AUD"
    }
  ]
}

Balance object

FieldTypeDescription
accountIdstringUUID of the account (matches IDs from the accounts endpoint)
currentBalancestring | nullCurrent balance as a decimal string. Negative if the account is in debit. null if the provider call failed for this account.
availableBalancestring | nullAvailable balance (funds available for transfer). null if the provider call failed.
currencystring | nullISO 4217 currency code (e.g. "AUD", "NZD"). null if the provider call failed.
Balance values are strings to preserve decimal precision. Parse them as decimals in your application. All three balance fields are nullable — when the provider errors for a given account, that account comes back with currentBalance, availableBalance, and currency all null. Parsers must handle that case.

Error responses

StatusWhen
400No accountIds provided, or more than 100 accounts requested
404One or more accounts not found, or do not belong to you
503Banking provider temporarily unavailable. Retry later.

Examples

Basic request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.redbark.co/v1/balances?accountIds=acc_abc123,acc_def456"

Python

import requests

API_KEY = "YOUR_API_KEY"

# Get account IDs first
accounts_resp = requests.get(
    "https://api.redbark.co/v1/accounts",
    headers={"Authorization": f"Bearer {API_KEY}"},
)
account_ids = [a["id"] for a in accounts_resp.json()["data"]]

# Fetch balances for all accounts
resp = requests.get(
    "https://api.redbark.co/v1/balances",
    headers={"Authorization": f"Bearer {API_KEY}"},
    params={"accountIds": ",".join(account_ids)},
)
balances = resp.json()["data"]

for b in balances:
    print(f"{b['accountId']}: {b['currency']} {b['currentBalance']} (available: {b['availableBalance']})")

JavaScript

const API_KEY = "YOUR_API_KEY";
const BASE = "https://api.redbark.co";

// Get account IDs first
const accountsResp = await fetch(`${BASE}/v1/accounts`, {
  headers: { Authorization: `Bearer ${API_KEY}` },
});
const { data: accounts } = await accountsResp.json();
const accountIds = accounts.map((a) => a.id).join(",");

// Fetch balances
const resp = await fetch(`${BASE}/v1/balances?accountIds=${accountIds}`, {
  headers: { Authorization: `Bearer ${API_KEY}` },
});
const { data: balances } = await resp.json();

for (const b of balances) {
  console.log(`${b.accountId}: ${b.currency} ${b.currentBalance} (available: ${b.availableBalance})`);
}