---
title: "Create a new transaction to a ledger"
method: POST
path: "/v2/{ledger}/transactions"
tags: ["ledger.v2"]
---

# Create a new transaction to a ledger

`POST /v2/{ledger}/transactions`

## Path parameters

- `ledger` string, required

## Query parameters

- `dryRun` boolean
- `force` boolean
- `schemaVersion` string

## Headers

- `Idempotency-Key` string

## Request body

- V2PostTransaction
  - `timestamp` string, date-time
  - `postings` V2Posting[]
    - `amount` integer, required
    - `asset` string, required
    - `destination` string, required
    - `source` string, required
  - `script` object
    - `template` string
    - `plain` string
    - `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
  - `force` boolean

## Response `200`

OK

- V2CreateTransactionResponse
  - `data` V2Transaction, required
    - `insertedAt` string, date-time
    - `updatedAt` 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
    - `template` string

## Other responses

- `default` — Error

## Changes

- **2026-01-06** `76fa93a7b1aa` — 3 info
  - added the new optional request property `script/template`
  - the request property `script/plain` became optional
  - added the optional property `data/template` to the response with the `200` status
- **2025-12-12** `2945092328b9` — 2 warning, 1 info
  - added the new `SCHEMA_ALREADY_EXISTS` enum value to the `errorCode` response property for the response status `default`
  - added the new `SCHEMA_NOT_SPECIFIED` enum value to the `errorCode` response property for the response status `default`
  - added the new optional `query` request parameter `schemaVersion`
- **2025-11-27** `40dde0d2ab0c` — 1 info
  - `query` request parameter `force` was reactivated
- **2025-07-16** `07091e08e779` — 1 info
  - added the optional property `data/updatedAt` to the response with the `200` status
- **2025-05-22** `5d95dc0cdcbe` — 2 info
  - added the new optional request property `force`
  - `query` request parameter `force` was deprecated

[Full history](https://skmtc.dev/formancehq/apis/ledger-api/changes/v2/:ledger/transactions/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/3ef3cb98f97a/schema)
