Sail

List Accounts & Balances

GET/users/{user_id}/accounts

Accounts across all of the user’s connections. Requires the benefit_account key scope. Balances require the benefit_account product on the owning connection.

Path Parameters

user_idstringrequired

The Sail user id.

Query Parameters

connection_idstring

Restrict to accounts under one connection.

typestring

Filter to accounts of one type.

limitinteger

Max results per page.

offsetinteger

Pagination offset.

Response

The user’s accounts.

dataobject[]
Show data properties
idstring

The Sail account id.

connection_idstring

The connection this account belongs to.

external_idstring

The administrator’s identifier for this account.

namestring

The account’s display name.

type"hsa" | "fsa" | "hra" | "checking" | "savings" | "credit_card"

The account type.

start_datestring<date>

When the account became effective.

end_datestring<date>

Plan-year end for plan-bound accounts (FSA); null for HSAs, which have no end date.

balanceobject

Present only when the owning connection has the benefit_account product.

Show balance properties
cashnumber<float>

Cash balance available.

investednumber<float>

Invested balance, if the account supports investments. Null otherwise.

last_sync_atstring<date-time>

When this account’s data was last synced. Null if it has never synced.

paginationobject

Pagination metadata for this page.

Show pagination properties
totalinteger

Total number of matching records, across all pages.

limitinteger

The limit used for this page.

offsetinteger

The offset used for this page.

has_moreboolean

Whether additional pages remain after this one.

Standard error envelope covering 400, 401, 403, 404, 429, and 500.

errorobject

The error detail.

Show error properties
codestring

Machine-readable code, e.g. not_found, token_scope_mismatch, product_not_enabled, insufficient_key_scope, insufficient_token_scope, user_token_required, user_token_expired, invalid_user_token, invalid_key_configuration, connection_not_reconnectable, rate_limited.

messagestring

Human-readable error message. May change, so match on error.code instead.

paramstring

The request field that caused the error, when applicable. Null otherwise.

Request
curl -X GET "https://live.savewithsail.com/api/v1/users/<user_id>/accounts?connection_id=<connection_id>&type=<type>&limit=<limit>&offset=<offset>" \
  -H "Authorization: Bearer <token>"
Response
{
  "data": [
    {
      "id": "acct_77b1",
      "connection_id": "string",
      "external_id": "string",
      "name": "string",
      "type": "hsa",
      "start_date": "2024-01-01",
      "end_date": "2024-01-01",
      "balance": {
        "cash": 1050.5,
        "invested": 0
      },
      "last_sync_at": "1970-01-01T00:00:00.000Z"
    }
  ],
  "pagination": {
    "total": 0,
    "limit": 0,
    "offset": 0,
    "has_more": true
  }
}