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

# Upsert movement legs on a custom connection

> Stores classified movement legs (the transaction tape) so they return through the existing connection transaction reads. Keyed by `client_movement_id` when given, else a hash of the leg identity.



## OpenAPI

````yaml /api-reference/platform-api.json post /v2/account-connections/{id}/movements
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/account-connections/{id}/movements:
    post:
      tags:
        - Account Connections
      summary: Upsert movement legs on a custom connection
      description: >-
        Stores classified movement legs (the transaction tape) so they return
        through the existing connection transaction reads. Keyed by
        `client_movement_id` when given, else a hash of the leg identity.
      operationId: upsertMovements
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertCustomMovementsDto'
      responses:
        '201':
          description: ''
components:
  schemas:
    UpsertCustomMovementsDto:
      type: object
      properties:
        movements:
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/CustomMovementInputDto'
      required:
        - movements
    CustomMovementInputDto:
      type: object
      properties:
        external_id:
          type: string
          maxLength: 256
          example: TRUST-1180
        client_movement_id:
          type: string
          maxLength: 255
          example: TEM-88421
          description: Client's unique movement id. Used as the movement key when present.
        booked_at:
          type: string
          example: '2026-09-10T09:11:00-05:00'
          description: Booked instant (ISO 8601).
        direction:
          type: string
          enum:
            - in
            - out
          example: in
        quantity:
          type: string
          example: '25000'
          description: Unsigned decimal string; sign comes from `direction`.
        asset:
          type: string
          maxLength: 255
          example: USDC
        asset_id:
          type: string
          maxLength: 255
          example: ethereum:0xa0b8...
        network:
          type: string
          maxLength: 255
          example: ethereum
        classification:
          type: string
          enum:
            - external_in
            - external_out
            - internal_hop
            - network_fee
            - swap_leg
            - unclassified
        source_ref:
          type: string
          maxLength: 255
          example: TEM-88421
          description: Bank/posting reference.
        tx_hash:
          type: string
          maxLength: 255
          example: '0x8af2'
          description: On-chain hash, if known.
        counterparty_name:
          type: string
          maxLength: 512
        counterparty_address:
          type: string
          maxLength: 255
        description:
          type: string
          maxLength: 2048
          example: client deposit
      required:
        - external_id
        - booked_at
        - direction
        - quantity
        - asset
        - asset_id
  securitySchemes:
    Authorization:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Authorization method required to allow user to access the api endpoints.

````