---
title: "Submit batch transactions"
method: POST
path: "/transactions/batch"
tags: ["Transactions"]
---

# Submit batch transactions

`POST /transactions/batch`

This allows you to submit multiple transactions.  The response has three outcomes:

1. All transactions succeed, and it will return a 202
2. Some transactions succeed, and it will return the failed transactions and a 206
3. No transactions succeed, and it will also return the failed transactions and a 206

To submit a transaction as JSON, you must submit a SubmitTransactionRequest.
To build this request, do the following:

1. Encode the transaction as BCS. If you are using a language that has
native BCS support, make sure to use that library. If not, you may take
advantage of /transactions/encode_submission. When using this
endpoint, make sure you trust the node you're talking to, as it is
possible they could manipulate your request.
2. Sign the encoded transaction and use it to create a TransactionSignature.
3. Submit the request. Make sure to use the "application/json" Content-Type.

To submit a transaction as BCS, you must submit a SignedTransaction
encoded as BCS. See SignedTransaction in types/src/transaction/mod.rs.
Make sure to use the `application/x.aptos.signed_transaction+bcs` Content-Type.

## Request body

- SubmitTransactionRequest[]
  - `sender` string, hex, required — A hex encoded 32 byte Aptos account address. This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x. For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1.
  - `sequence_number` string, uint64, required — A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
  - `max_gas_amount` string, uint64, required — A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
  - `gas_unit_price` string, uint64, required — A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
  - `expiration_timestamp_secs` string, uint64, required — A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
  - `payload` union, required — An enum of the possible transaction payloads
    - object — Payload which runs a single entry function
      - `type` string, required
      - `function` string, required — Entry function id is string representation of a entry function defined on-chain. Format: `{address}::{module name}::{function name}` Both `module name` and `function name` are case-sensitive.
      - `type_arguments` MoveType[], required — Type arguments of the function
      - `arguments` unknown[], required — Arguments of the function
        - unknown
    - object — Payload which runs a script that can run multiple functions
      - `type` string, required
      - `code` MoveScriptBytecode, required — Move script bytecode
        - `bytecode` string, hex, required — All bytes (Vec<u8>) data is represented as hex-encoded string prefixed with `0x` and fulfilled with two hex digits per byte. Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
        - `abi` MoveFunction — Move function
          - `name` string, required
          - `visibility` 'private' | 'public' | 'friend', required — Move function visibility
          - `is_entry` boolean, required — Whether the function can be called as an entry function directly in a transaction
          - `is_view` boolean, required — Whether the function is a view function or not
          - `generic_type_params` MoveFunctionGenericTypeParam[], required — Generic type params associated with the Move function
            - `constraints` MoveAbility[], required — Move abilities tied to the generic type param and associated with the function that uses it
          - `params` MoveType[], required — Parameters associated with the move function
          - `return` MoveType[], required — Return type of the function
      - `type_arguments` MoveType[], required — Type arguments of the function
      - `arguments` unknown[], required — Arguments of the function
        - unknown
    - object
      - `type` string, required
      - `modules` MoveModuleBytecode[], required
        - `bytecode` string, hex, required — All bytes (Vec<u8>) data is represented as hex-encoded string prefixed with `0x` and fulfilled with two hex digits per byte. Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
        - `abi` MoveModule — A Move module
          - `address` string, hex, required — A hex encoded 32 byte Aptos account address. This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x. For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1.
          - `name` string, required
          - `friends` MoveModuleId[], required — Friends of the module
          - `exposed_functions` MoveFunction[], required — Public functions of the module
            - `name` string, required
            - `visibility` 'private' | 'public' | 'friend', required — Move function visibility
            - `is_entry` boolean, required — Whether the function can be called as an entry function directly in a transaction
            - `is_view` boolean, required — Whether the function is a view function or not
            - `generic_type_params` MoveFunctionGenericTypeParam[], required — Generic type params associated with the Move function
              - …
            - `params` MoveType[], required — Parameters associated with the move function
            - `return` MoveType[], required — Return type of the function
          - `structs` MoveStruct[], required — Structs of the module
            - `name` string, required
            - `is_native` boolean, required — Whether the struct is a native struct of Move
            - `abilities` MoveAbility[], required — Abilities associated with the struct
            - `generic_type_params` MoveStructGenericTypeParam[], required — Generic types associated with the struct
              - …
            - `fields` MoveStructField[], required — Fields associated with the struct
              - …
    - object — A multisig transaction that allows an owner of a multisig account to execute a pre-approved transaction as the multisig account.
      - `type` string, required
      - `multisig_address` string, hex, required — A hex encoded 32 byte Aptos account address. This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x. For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1.
      - `transaction_payload` MultisigTransactionPayload — Payload which runs a single entry function
        - `function` string, required — Entry function id is string representation of a entry function defined on-chain. Format: `{address}::{module name}::{function name}` Both `module name` and `function name` are case-sensitive.
        - `type_arguments` MoveType[], required — Type arguments of the function
        - `arguments` unknown[], required — Arguments of the function
          - unknown
  - `signature` TransactionSignature, required — unresolved $ref

## Response `202`

- TransactionsBatchSubmissionResult — Batch transaction submission result Tells which transactions failed
  - `transaction_failures` TransactionsBatchSingleSubmissionFailure[], required — Summary of the failed transactions
    - `error` AptosError, required — This is the generic struct we use for all API errors, it contains a string message and an Aptos API specific error code.
      - `message` string, required — A message describing the error
      - `error_code` 'account_not_found' | 'resource_not_found' | 'module_not_found' | 'struct_field_not_found' | 'version_not_found' | 'transaction_not_found' | 'table_item_not_found' | 'block_not_found' | 'state_value_not_found' | 'version_pruned' | 'block_pruned' | 'invalid_input' | 'invalid_transaction_update' | 'sequence_number_too_old' | 'vm_error' | 'health_check_failed' | 'mempool_is_full' | 'internal_error' | 'web_framework_error' | 'bcs_not_supported' | 'api_disabled', required — These codes provide more granular error information beyond just the HTTP status code of the response.
      - `vm_error_code` integer — A code providing VM error details when submitting transactions to the VM
    - `transaction_index` integer, required — The index of which transaction failed, same as submission order

## Other responses

- `206`
- `400`
- `403`
- `413`
- `500`
- `503`
- `507`

## Changes

- **2023-10-17** `fa2eb0569bc4` — 6 breaking, 18 info
  - removed `#/components/schemas/AccountSignature_Secp256k1EcdsaSignature` from the `items/signature/oneOf[#/components/schemas/TransactionSignature_FeePayerSignature]/allOf[#/components/schemas/FeePayerSignature]/fee_payer_signer/allOf[#/components/schemas/AccountSignature]/` request property `oneOf` list
  - removed `#/components/schemas/AccountSignature_Secp256k1EcdsaSignature` from the `items/signature/oneOf[#/components/schemas/TransactionSignature_FeePayerSignature]/allOf[#/components/schemas/FeePayerSignature]/secondary_signers/items/` request property `oneOf` list
  - removed `#/components/schemas/AccountSignature_Secp256k1EcdsaSignature` from the `items/signature/oneOf[#/components/schemas/TransactionSignature_FeePayerSignature]/allOf[#/components/schemas/FeePayerSignature]/sender` request property `oneOf` list
  - removed `#/components/schemas/AccountSignature_Secp256k1EcdsaSignature` from the `items/signature/oneOf[#/components/schemas/TransactionSignature_MultiAgentSignature]/allOf[#/components/schemas/MultiAgentSignature]/secondary_signers/items/` request property `oneOf` list
  - …20 more
- …earlier changes not shown

[Full history](https://skmtc.dev/pontem-network/apis/lumio-node-api/changes/transactions/batch/post.md)

---

[API](https://skmtc.dev/pontem-network/apis/lumio-node-api.md) · [All operations](https://skmtc.dev/pontem-network/apis/lumio-node-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pontem-network/lumio-node-api/revisions/fa2eb0569bc4/schema)
