> ## 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.

# Update workspace accounts

> Add, update, or remove workspace accounts in a batch.



## OpenAPI

````yaml api-reference/platform-api.json put /v2/accounts
openapi: 3.0.0
info:
  title: Range Platform API
  description: >-
    The Range Platform API for workspace management, counterparties, and
    operational tooling.
  version: 1.7.37
  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.
  - name: Parties
    description: >-
      The workspace entity register: the firm itself, its clients, and its
      counterparties.
paths:
  /v2/accounts:
    put:
      tags:
        - Accounts
      summary: Add or remove accounts
      description: >-
        Batch add, update, or remove accounts for the caller workspace. Remove
        returns 404 when the account id is not found in the workspace.
      operationId: updateAccounts
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAccountsDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateAccountsResponseDto'
components:
  schemas:
    UpdateAccountsDto:
      type: object
      properties:
        operations:
          minItems: 1
          example:
            - action: add
              account:
                name: Treasury wallet
                network: solana
                address: BJE5MMbqXjVwjAF7oxwPYXnTXDyspzZyt4vwenNw5ruG
                category: Multisig
                group_ids:
                  - uuid-1
            - action: remove
              account:
                network: stellar
                address: GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
          type: array
          items:
            $ref: '#/components/schemas/AccountOperationDto'
      required:
        - operations
    UpdateAccountsResponseDto:
      type: object
      properties:
        acknowledged:
          type: boolean
          example: true
        sync_batch_id:
          type: string
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
          description: >-
            Batch id of the transaction sync enqueued for the accounts this
            request added (ADR-0045). Poll it with `GET
            /v2/accounts/transfers/sync/status?batch_id=`. Absent when the
            request added no accounts, or when the sync could not be enqueued —
            the accounts are still created in that case.
      required:
        - acknowledged
    AccountOperationDto:
      type: object
      properties:
        action:
          type: string
          enum:
            - add
            - remove
            - update
          example: add
        account:
          $ref: '#/components/schemas/AccountDataDto'
      required:
        - action
        - account
    AccountDataDto:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        name:
          type: string
          example: Treasury wallet
          description: >-
            Omit entirely to leave the account unnamed — an empty string is
            rejected rather than stored, so "no name" and "named empty" can
            never be confused.
        type:
          type: string
          enum:
            - eoa
            - multisig
            - contract
            - custodian
            - exchange
            - bank
            - defi
          example: eoa
          default: eoa
        network:
          type: string
          example: eth
          description: >-
            Canonical Range network slug, e.g. eth, bnb, solana. Known aliases
            (ethereum, binance, …) are normalized on write.
        address:
          type: string
          example: BJE5MMbqXjVwjAF7oxwPYXnTXDyspzZyt4vwenNw5ruG
        category:
          type: string
          example: exchange
        group_ids:
          example:
            - uuid-1
            - uuid-2
          type: array
          items:
            type: string
        connection_id:
          type: string
          example: utila-123
          description: Account connection holding this account
        connection_object_id:
          type: string
          example: vaults/abc/wallets/xyz
          description: External object ID (e.g., wallet) from the connection provider
        notes:
          type: string
          example: Primary treasury wallet
        import_notes:
          type: boolean
          example: false
          description: >-
            When true, each sync copies the provider transaction note into the
            user note for a provider that supplies one. Other providers leave
            the stored note unchanged. Omitted on update leaves the stored
            value. A new account defaults to false.
        role:
          type: string
          example: Treasury
        books:
          type: string
          example: house
          enum:
            - house
            - client
          description: >-
            Which books this account sits on (custom connections — F4 /
            RNG-5533).
        entity_id:
          type: string
          nullable: true
          format: uuid
          example: a1b2c3d4-5678-90ab-cdef-1234567890ab
          description: >-
            The register entity this account belongs to (`/v2/parties`). Must be
            an entity of this workspace. Omitted on a new add attaches to
            `self`. Omitted on an add-upsert of an existing id, or on update,
            leaves the stored entity. `null` on add or update moves the account
            to `self`.
        regulatory:
          nullable: true
          description: >-
            Account-level regulatory settings shared by every CADOC filing
            (custodian, ownership, staking). An object upserts them; null clears
            them.
          type: object
          allOf:
            - $ref: '#/components/schemas/AccountRegulatorySettingsDto'
        cadoc_5710:
          nullable: true
          description: >-
            CADOC 5710 (monthly reserves) registration. An object
            registers/updates the account for template 5710; null unregisters
            it.
          type: object
          allOf:
            - $ref: '#/components/schemas/Cadoc5710PropertiesDto'
        cadoc_5711:
          nullable: true
          description: >-
            CADOC 5711 (daily custody) registration. An object registers/updates
            the account for template 5711; null unregisters it.
          type: object
          allOf:
            - $ref: '#/components/schemas/Cadoc5711PropertiesDto'
        treasury_statement:
          type: object
          nullable: true
          properties: {}
          additionalProperties: false
          description: >-
            Treasury statement registration. An empty object includes this
            account; null unregisters it; omission preserves the selection.
        transfer_attribution:
          type: object
          nullable: true
          properties: {}
          additionalProperties: false
          description: >-
            Transfer attribution registration. An empty object includes this
            account; null unregisters it; omission preserves the selection.
        carf_uk_xml:
          type: object
          nullable: true
          properties: {}
          additionalProperties: false
          description: >-
            CARF UK XML registration. An empty object includes this account in
            the CARF transfer report; null unregisters it; omission preserves
            the selection.
        corridor_reconciliation:
          type: object
          nullable: true
          properties: {}
          additionalProperties: false
          description: >-
            Corridor reconciliation registration. An empty object includes this
            account; null unregisters it; omission preserves the selection.
        redemption_monitor:
          type: object
          nullable: true
          properties: {}
          additionalProperties: false
          description: >-
            Redemption monitor payout account. An empty object registers this
            account; null unregisters it; omission preserves the selection. At
            most one per workspace.
        full_agreement:
          nullable: true
          description: >-
            Manual ledger pairing for full-agreement reconciliation. An object
            sets the override; null clears it; omission preserves it.
          type: object
          allOf:
            - $ref: '#/components/schemas/FullAgreementOverrideDto'
        balances:
          type: array
          items:
            $ref: '#/components/schemas/AccountBalance'
    AccountRegulatorySettingsDto:
      type: object
      properties:
        custodian_code:
          type: string
          example: Z1234567
          description: >-
            BCB Z-code of the custodian: Z followed by 7 digits. Maps to
            psavCustodiante on both filings.
        custodian_country:
          type: string
          example: BR
          description: >-
            ISO-3166 alpha-2 country of the custodian. Maps to
            psavCustodiantePais.
        ownership:
          type: string
          enum:
            - own
            - client
            - other_fi
          example: client
          description: Whose funds the account holds (W2A·A4 classification).
        is_staking:
          type: boolean
          example: false
          description: Whether the account is a staking position (W2A·A4).
      required:
        - custodian_code
        - custodian_country
        - ownership
        - is_staking
    Cadoc5710PropertiesDto:
      type: object
      properties:
        address_type:
          type: string
          enum:
            - CUSTODIA_PROPRIA_OMNIBUS
            - CUSTODIA_PROPRIA_SEGREGADO
            - SUBCUSTODIANTE_TERCEIRO
            - CONTRATO_TOKEN
            - CONTRATO_STAKING
            - VALIDADOR
            - DEPOSITO_EXCHANGE
            - NAO_VERIFICAVEL_ONCHAIN
            - '99'
          example: CUSTODIA_PROPRIA_SEGREGADO
          description: BCB Annex 6.1 code. Maps to CADOC 5710 tipoEndereco.
        wallet_type:
          type: string
          enum:
            - QUENTE
            - MORNA
            - FRIA
            - CUSTODIA_TERCEIRO
            - NAO_APLICAVEL
            - '99'
          example: FRIA
          description: BCB Annex 6.1 code. Maps to CADOC 5710 tipoCarteira.
      required:
        - address_type
        - wallet_type
    Cadoc5711PropertiesDto:
      type: object
      properties:
        client_tax_id:
          type: string
          example: '52998224725'
          description: >-
            Client CPF (11 digits) or CNPJ (14 digits), digits only, verified
            against the mod-11 check digits. Maps to CADOC 5711 clienteId.
            Requires client_tax_id_type.
        client_tax_id_type:
          type: string
          enum:
            - cpf
            - cnpj
          example: cpf
          description: >-
            Declared tax-id type. Maps to CADOC 5711 tipoCliente. Requires
            client_tax_id.
    FullAgreementOverrideDto:
      type: object
      properties:
        ledger_account_id:
          type: string
          format: uuid
          description: Ledger account on a custom connection, same client as the wallet.
      required:
        - ledger_account_id
    AccountBalance:
      type: object
      properties:
        asset:
          type: string
          example: USDC
          description: >-
            Legacy asset ticker. Prefer `symbol`/`name`; kept for backwards
            compatibility.
        symbol:
          type: string
          example: USDC
          description: >-
            Asset ticker / symbol. Always present on API responses (filled from
            `asset` when omitted at write time).
        name:
          type: string
          example: USD Coin
          description: >-
            Human-readable asset name. Always present on API responses; falls
            back to `symbol` when a distinct name is unavailable.
        amount:
          type: string
          example: '100.50'
          description: >-
            Raw quantity reported by the provider, in asset units, as a decimal
            string.
        usd:
          type: string
          nullable: true
          example: '100.50'
          description: >-
            USD equivalent of `amount` as a decimal string. `null` when no USD
            price is available (distinct from `"0"`). For fiat accounts, equals
            `amount`.
        updated_at:
          type: string
          example: '2024-01-01T00:00:00.000Z'
        price_updated_at:
          type: string
          nullable: true
          example: '2024-01-01T00:00:00.000Z'
          description: >-
            When the unit price backing `usd` was fetched at its source
            (CoinGecko cache, Alchemy Prices). `null` when the source reported
            no timestamp; absent for balances persisted before this field
            existed.
        price_source:
          type: string
          nullable: true
          example: coingecko
          description: >-
            Which pricing product supplied the unit price backing `usd`
            (`coingecko`, `alchemy`). `null` when the source is untracked;
            absent for balances persisted before this field existed.
        denom:
          type: string
          nullable: true
          example: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
          description: >-
            Raw on-chain denom (contract address / mint / IBC denom) this
            balance line was fetched under, when the source is on-chain. Absent
            for balances persisted before this field existed and for
            exchange/custodian sources, which have no on-chain denom.
        verified:
          type: boolean
          example: false
          description: >-
            Stored `false` when the custodian marks this asset unverified (e.g.
            Dfns flags a spam or impersonation token). Balance reads (account
            balances and `balances_usd`, tokens, concentration, treasury,
            connection preview) leave such an entry out, so a listed entry never
            carries `false`; full agreement compares the asset like any other
            and flags its line `unverified_by_custodian`. Absent when the source
            made no such claim.
        asset_id:
          type: string
          example: ethereum:native
          description: >-
            Custom snapshot identity (`network:denom` or a fiat ISO code). Merge
            and delete key on this; `denom` stays the bare contract/mint. Absent
            for every other balance source.
      required:
        - asset
        - amount
        - updated_at
  securitySchemes:
    Authorization:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Authorization method required to allow user to access the api endpoints.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.