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

# Submit transaction

`POST /transactions`

This endpoint accepts transaction submissions in two formats.

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 of 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 — A request to submit a transaction This requires a transaction and a signature of it
  - `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
    - 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`

- PendingTransaction — A transaction waiting in mempool
  - `hash` string, required
  - `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
    - 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 — unresolved $ref

## Other responses

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

## Changes

- **2024-02-13** `d470f1bd0244` — 2 breaking, 4 info
  - removed `#/components/schemas/TransactionPayload_ModuleBundlePayload` from the `payload` request property `oneOf` list
  - added `#/components/schemas/TransactionPayload_DeprecatedModuleBundlePayload` to the `payload` response property `oneOf` list for the response status `202`
  - mapped value for discriminator key `module_bundle_payload` changed from `#/components/schemas/TransactionPayload_ModuleBundlePayload` to `#/components/schemas/TransactionPayload_DeprecatedModuleBundlePayload` for `payload` request property
  - added `#/components/schemas/TransactionPayload_DeprecatedModuleBundlePayload` to the `payload` request property `oneOf` list
  - …2 more
- …earlier changes not shown

[Full history](https://skmtc.dev/pontem-network/apis/lumio-node-api/changes/transactions/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/d470f1bd0244/schema)
