Create a Block Transaction
Use this endpoint to create a transaction whose resulting operations are typed BLOCK. Midaz is agnostic about the business reason for blocking funds — use the metadata field to record it.
This endpoint always creates an immediately-posted, non-pending transaction: the pending field of the request body is ignored (overridden to false) — block transactions are never pending. The endpoint accepts the same body as the JSON create endpoint.
Headers
The type of media of the resource. Recommended value is application/json.
A unique identifier used to trace and track each request.
Bearer JWT token for authentication.
Required when PLUGIN_AUTH_ENABLED=true (enforced in multi-tenant deployments).
Optional in default OSS single-tenant mode.
Format: Bearer <token>
A unique key that ensures transaction idempotency. If not provided, the system automatically generates a SHA-256 hash based on the request body. Keys are scoped per organization and ledger.
Always validate the X-Idempotency-Replayed response header to distinguish new transactions from cached replays.
See Retries and idempotency for best practices.
The time-to-live for the idempotency key, defined in seconds. Defaults to 300 seconds (5 minutes) if not provided. Only the TTL from the first request is used; changing it on retries has no effect.
See Retries and idempotency for details.
Path Parameters
The unique identifier of the Organization associated with the Ledger.
The unique identifier of the associated Ledger.
Body
The name of the chart-of-accounts group associated with the transaction.
256A description for the transaction.
256Indicates whether the transaction should follow a two-step process: authorization followed by execution. When set to true, the transaction is created in a pending state, reserving funds (on_hold) without immediately moving them. A subsequent commit is required to finalize the transfer.
Transaction code for reference.
100Deprecated. Use routeId instead. Legacy route identifier kept for backward compatibility; accepted from the client but not used for routing validation.
The unique identifier (UUID) of the Transaction Route associated with this transaction.
Important: When Transaction Routing validation is enabled for your Ledger, this field becomes mandatory and must match an existing id from your configured Transaction Routes. However, when validation is disabled (default behavior), this field is optional.
The time when the transaction was made. Used to add past transactions. Must be a date in the past.
An object containing information about the transaction that will be sent.
An object containing key-value pairs to add as metadata, where the field name is the key and the field value is the value. For example, to add a Cost Center, use 'costCenter': 'BR_11101997'.
Constraints: keys must be at most 100 characters; string values at most 2000 characters. Nested objects are not allowed (values must be string, number, or boolean), the structure may not exceed a maximum depth of 10, and a maximum of 100 keys is permitted.
Response
Indicates that the resource was successfully created and the operation was completed as expected.
The response includes the X-Idempotency-Replayed header.
If the value is false, the transaction was just processed. If the value is true, the response is a replay of a previously processed request.
See Retries and idempotency for more details.
The unique identifier of the transaction.
The unique identifier of the parent/original transaction for reversals. This field is populated by the server when a transaction is reverted and should be treated as read-only by clients.
The unique identifier of the Organization.
The unique identifier of the Ledger.
Description of the transaction.
Specifies the Transaction Route associated with the transaction.
The unique identifier of the Transaction Route applied to this transaction.
The transaction status (pending, completed, reversed).
The sent amount.
The name of the asset used in the operation.
The name of the chart-of-accounts group.
The list of accounts used as source.
The list of accounts used as destination.
Timestamp of creation (UTC).
Timestamp of last update (UTC).
Timestamp of soft deletion, if applicable (UTC).
An object containing key-value pairs to add as metadata, where the field name is the key and the field value is the value. For example, to add a Cost Center, use 'costCenter': 'BR_11101997'.
Constraints: keys must be at most 100 characters; string values at most 2000 characters. Nested objects are not allowed (values must be string, number, or boolean), the structure may not exceed a maximum depth of 10, and a maximum of 100 keys is permitted.

