> ## Documentation Index
> Fetch the complete documentation index at: https://docs.range.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Refresh balances for the workspace or for given accounts

> Synchronously refreshes balances — connection-backed (Wise/Kraken/Safe/etc.) and standalone on-chain wallets alike — and persists them. With no body, or an empty `account_ids`, every account in the caller workspace is refreshed; with `account_ids`, exactly those accounts — all of which must belong to the caller workspace, or the request fails with 404.



## OpenAPI

````yaml /api-reference/platform-api.json post /v2/accounts/refresh
openapi: 3.0.0
info:
  title: Range Platform API
  description: >-
    The Range Platform API for workspace management, counterparties, and
    operational tooling.
  version: 1.7.27
  contact: {}
servers:
  - url: https://api.range.org
    description: Range API Server
security:
  - Authorization: []
  - Authorization: []
tags:
  - name: Address Information
    description: Get information about a crypto address.
  - name: Transfer Enrichments
    description: Attach workspace-scoped notes and categories to transfers.
  - name: Counterparties
    description: Manage external entities, their addresses, bank accounts, and documents.
paths:
  /v2/accounts/refresh:
    post:
      tags:
        - Accounts
      summary: Refresh balances for the workspace or for given accounts
      description: >-
        Synchronously refreshes balances — connection-backed
        (Wise/Kraken/Safe/etc.) and standalone on-chain wallets alike — and
        persists them. With no body, or an empty `account_ids`, every account in
        the caller workspace is refreshed; with `account_ids`, exactly those
        accounts — all of which must belong to the caller workspace, or the
        request fails with 404.
      operationId: refreshAccounts
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountIdsBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefreshAccountsResponseDto'
components:
  schemas:
    AccountIdsBodyDto:
      type: object
      properties:
        account_ids:
          example:
            - a1b2c3d4-e5f6-7890-abcd-ef1234567890
          description: >-
            Limit the action to these workspace accounts. Omit to cover every
            account in the workspace. Every id must belong to the caller
            workspace or the request fails with 404.
          type: array
          items:
            type: string
            format: uuid
    RefreshAccountsResponseDto:
      type: object
      properties:
        refreshed:
          type: number
          example: 12
          description: Number of accounts whose balances were refreshed.
        failed:
          type: number
          example: 1
          description: >-
            Number of accounts whose balance refresh failed (e.g. provider
            error).
        skipped:
          type: number
          example: 2
          description: >-
            Number of accounts whose holdings could not be read at all — their
            chain has no readable balance source, or their connection's provider
            is no longer supported. Neither refreshed nor failed, since there is
            nothing to retry and nothing actionable to report. `refreshed +
            failed + skipped` is the total number of accounts this pass
            considered. Additive field (RNG-5758); clients reading only the
            existing counts keep working unmodified.
        failures:
          description: >-
            Per-account detail, one entry per failed account; its length always
            matches `failed`. Always present — an empty array when nothing
            failed. Additive field, so older clients that only read the counts
            keep working.
          type: array
          items:
            $ref: '#/components/schemas/RefreshAccountFailureDto'
      required:
        - refreshed
        - failed
        - skipped
        - failures
    RefreshAccountFailureDto:
      type: object
      properties:
        account_id:
          type: string
          example: account-uuid-1
          description: Id of the account whose balance refresh failed.
        label:
          type: string
          example: Kraken treasury
          description: >-
            Human label for the account (its name, falling back to a shortened
            address).
        reason:
          type: string
          example: Provider timed out
          description: >-
            Short, human-readable reason the refresh failed for this account.
            Exact values are unchanged from before `reason_code` existed, so
            existing renderers keep working untouched.
        reason_code:
          type: object
          example: provider_timeout
          description: >-
            Machine-stable code for the failure reason (RNG-5758), additive
            alongside `reason` and computed by the same classifier that derives
            `AccountDto.last_balance_refresh_status`'s reason column. Branch on
            this rather than string-matching `reason`, whose wording may be
            reworded later.
        ref:
          type: string
          nullable: true
          example: a3f91c7e
          description: >-
            Opaque reference (RNG-5072) correlating this failure with the raw
            error already logged for it — quote it in a bug report or support
            ticket to go straight to the real error instead of hunting logs by
            workspace/account/timestamp. Never sensitive; safe to screenshot.
            `null` when there is no underlying raw error to correlate (e.g. the
            account's connection could not be found — `reason` alone is already
            the full explanation).
      required:
        - account_id
        - label
        - reason
        - reason_code
        - ref
  securitySchemes:
    Authorization:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Authorization method required to allow user to access the api endpoints.

````