transactions - Stacks

Broadcasts a signed, serialized transaction to the network. The body is the raw transaction bytes (hex string with application/json, or raw bytes with application/octet-stream). On acceptance the node returns the transaction ID.

Endpoint

httpPOST /v2/transactions

Example

bashexport STACKS_RPC=https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

# The body is the raw, signed, serialized transaction bytes
curl -X POST "${STACKS_RPC}v2/transactions" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @signed-tx.bin

Response

json"0x7c3b8a2d5f70910013af2c9e4b7a1d6f3028e5c7b9a0d4f1e6c3b8a2d5f70910"

Response Fields

FieldTypeDescription
(value)stringThe transaction ID (txid) assigned on acceptance

Use Cases

  • Transaction submission: Broadcast a signed STX transfer, contract call, or deploy
  • Confirmation: Poll the returned txid through an explorer or indexer

Error Handling

ErrorMessageDescription
400 / Bad requestBad requestA path, query, or body parameter was invalid or the transaction was rejected
404 / Not foundNot foundThe account, contract, map entry, variable, or constant does not exist
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect