Get an organization's balance over time

How the balance has moved, one point per period — the line behind a spending chart. Choose the period with `interval` and the range with `time_range` or the `when_created` dates. Each point is the balance as it stood at the end of that period. Requires the `organizations.read` permission.

GET
/organizations/{organizationId}/balance/history
AuthorizationBearer <token>

The access token returned after a successful sign-in, sent as Authorization: Bearer <access_token>.

It identifies the person and the organization they are working in, and it lasts about fifteen minutes. When it runs out, use their refresh token at POST /auth/refresh-token instead of asking them to sign in again.

In: header

Path Parameters

organizationId*string

Identifier of the organization. Each endpoint states whether it must be the caller's active organization or may be used without authentication.

Query Parameters

interval?string

Bucket size for a time series. It fixes how many points the series has over the requested window, so a long window with a small interval is an expensive request.

Default"week"
Value in"hour" | "day" | "week" | "month" | "year"
time_range?string

Named time window relative to now. Endpoints that also expose from and to can use those parameters for an exact window instead.

Default"all"
Value in"all" | "today" | "week" | "month" | "year"
when_created[$gt]?string

Include changes strictly after this moment.

Formatdate-time
when_created[$lt]?string

Include changes strictly before this moment.

Formatdate-time
when_created[$gte]?string

Include changes at or after this moment.

Formatdate-time
when_created[$lte]?string

Include changes at or before this moment.

Formatdate-time

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.dual.network/organizations/665f1c2d4b1a2c3d4e5f6aa0/balance/history"
{
  "history": [
    {
      "when": "2026-02-16T00:00:00Z",
      "amount": "1500.000000"
    },
    {
      "when": "2026-02-23T00:00:00Z",
      "amount": "1402.180000"
    },
    {
      "when": "2026-03-02T00:00:00Z",
      "amount": "1284.520000"
    }
  ]
}
{
  "code": 3,
  "message": "Key: 'limit' Error:Field validation for 'limit' failed on the 'lte' tag"
}

{
  "code": 16,
  "message": "no auth provided"
}

{
  "code": 5,
  "message": "object not found"
}
{
  "code": 13,
  "message": "internal error"
}