---
title: "Bulk request"
method: POST
path: "/v2/{ledger}/_bulk"
tags: ["ledger.v2"]
---

# Bulk request

`POST /v2/{ledger}/_bulk`

## Path parameters

- `ledger` string, required

## Query parameters

- `continueOnFailure` boolean
- `atomic` boolean
- `parallel` boolean

## Request body

- V2BulkElement[]
  - union
    - object
      - `action` string, required
      - `ik` string
      - `data` V2PostTransaction
        - `timestamp` string, date-time
        - `postings` V2Posting[]
          - `amount` integer, required
          - `asset` string, required
          - `destination` string, required
          - `source` string, required
        - `script` object
          - `plain` string, required
          - `vars` object
        - `runtime` 'experimental-interpreter' | 'machine' — The numscript runtime used to execute the script. Uses "machine" by default, unless the "--experimental-numscript-interpreter" feature flag is passed.
        - `reference` string
        - `metadata` V2Metadata, required
        - `accountMetadata` object
    - object
      - `action` string, required
      - `ik` string
      - `data` object
        - `targetId` union, required
          - string
          - integer
        - `targetType` 'TRANSACTION' | 'ACCOUNT', required
        - `metadata` object, required
    - object
      - `action` string, required
      - `ik` string
      - `data` object
        - `id` integer, required
        - `force` boolean
        - `atEffectiveDate` boolean
    - object
      - `action` string, required
      - `ik` string
      - `data` object
        - `targetId` union, required
          - string
          - integer
        - `targetType` 'TRANSACTION' | 'ACCOUNT', required
        - `key` string, required

## Response `200`

OK

- V2BulkResponse
  - `data` V2BulkElementResult[]
    - union
      - object
        - `responseType` string, required
        - `logID` integer, required
        - `data` V2Transaction, required
          - `insertedAt` string, date-time
          - `timestamp` string, date-time, required
          - `postings` V2Posting[], required
            - `amount` integer, required
            - `asset` string, required
            - `destination` string, required
            - `source` string, required
          - `reference` string
          - `metadata` V2Metadata, required
          - `id` integer, required
          - `reverted` boolean, required
          - `revertedAt` string, date-time
          - `preCommitVolumes` V2AggregatedVolumes
          - `postCommitVolumes` V2AggregatedVolumes
          - `preCommitEffectiveVolumes` V2AggregatedVolumes
          - `postCommitEffectiveVolumes` V2AggregatedVolumes
      - V2BaseBulkElementResult
        - `responseType` string, required
        - `logID` integer, required
      - object
        - `responseType` string, required
        - `logID` integer, required
        - `data` V2Transaction, required
          - `insertedAt` string, date-time
          - `timestamp` string, date-time, required
          - `postings` V2Posting[], required
            - `amount` integer, required
            - `asset` string, required
            - `destination` string, required
            - `source` string, required
          - `reference` string
          - `metadata` V2Metadata, required
          - `id` integer, required
          - `reverted` boolean, required
          - `revertedAt` string, date-time
          - `preCommitVolumes` V2AggregatedVolumes
          - `postCommitVolumes` V2AggregatedVolumes
          - `preCommitEffectiveVolumes` V2AggregatedVolumes
          - `postCommitEffectiveVolumes` V2AggregatedVolumes
      - V2BaseBulkElementResult
        - `responseType` string, required
        - `logID` integer, required
      - object
        - `responseType` string, required
        - `logID` integer, required
        - `errorCode` string, required
        - `errorDescription` string, required
        - `errorDetails` string
  - `errorCode` 'INTERNAL' | 'INSUFFICIENT_FUND' | 'VALIDATION' | 'CONFLICT' | 'COMPILATION_FAILED' | 'METADATA_OVERRIDE' | 'NOT_FOUND' | 'REVERT_OCCURRING' | 'ALREADY_REVERT' | 'NO_POSTINGS' | 'LEDGER_NOT_FOUND' | 'IMPORT' | 'TIMEOUT' | 'BULK_SIZE_EXCEEDED' | 'INTERPRETER_PARSE' | 'INTERPRETER_RUNTIME' | 'LEDGER_ALREADY_EXISTS' | 'OUTDATED_SCHEMA'
  - `errorMessage` string

## Other responses

- `400` — OK
- `default` — Error

## Changes

- **2025-05-06** `814894ce73ff` — 1 breaking, 1 info
  - removed the enum value `interpreter` of the request property `items/oneOf[#/components/schemas/V2BulkElementCreateTransaction]/allOf[subschema #2]/data/runtime`
  - added the new `experimental-interpreter` enum value to the request property `items/oneOf[#/components/schemas/V2BulkElementCreateTransaction]/allOf[subschema #2]/data/runtime`
- **2025-04-29** `0489176f2c72` — 1 info
  - added the new optional request property `items/oneOf[#/components/schemas/V2BulkElementCreateTransaction]/allOf[subschema #2]/data/runtime`
- **2025-04-08** `1a1c72b8b3db` — 2 breaking, 8 info
  - the response property `data` became optional for the status `200`
  - the response property `data` became optional for the status `400`
  - removed `#/components/schemas/V2ErrorResponse, subschema #1` from the response body `allOf` list for the response status `200`
  - removed `#/components/schemas/V2ErrorResponse, subschema #1` from the response body `allOf` list for the response status `400`
  - …6 more
- **2025-03-28** `790fc545ce75` — 1 info
  - added the new optional request property `items/oneOf[#/components/schemas/V2BulkElementCreateTransaction]/allOf[subschema #2]/data/accountMetadata`
- **2025-03-13** `a13b37bacc1f` — 1 breaking
  - request body became required

[Full history](https://skmtc.dev/formancehq/apis/ledger-api/changes/v2/:ledger/_bulk/post.md)

---

[API](https://skmtc.dev/formancehq/apis/ledger-api.md) · [All operations](https://skmtc.dev/formancehq/apis/ledger-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/formancehq/ledger-api/revisions/8bb59440bb35/schema)
