sendboc - TON

Example code for the sendboc JSON-RPC method. Сomplete guide on how to use sendboc JSON-RPC in GetBlock.io Web3 documentation.

This method broadcasts a serialized Bag of Cells (BOC) — a signed external message — to the TON blockchain for execution. It is the standard method for submitting transactions from wallets and dApps.

Parameters

Parameter
Type
Required
Description

boc

string

Yes

Base64-encoded BOC of the signed external message

Request Example

JSON-RPC (POST):

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "sendBoc",
    "params": {
        "boc": "te6cckEBAQEAUgAAn/8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x/THwL4I7vyZO1E0NMf0x/T//QE0VFDuvKhUVG68qIG+QFUEHb5EPKj+CO78mPtRNDXCx/jAFETuvKh1AAQc8L/8tCD"
    },
    "id": "getblock.io"
}'

Response Example

Response Parameters

Field
Type
Description

ok

boolean

Whether the BOC was accepted for broadcast

result.@type

string

Always ok on success

Use Cases

  • Submitting wallet transfers from dApps

  • Broadcasting smart contract deploys

  • Sending Jetton or NFT transfer messages

  • Any state-mutating interaction with the TON blockchain

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid <ACCESS-TOKEN>

422

Validation Error

Request parameters are missing or malformed

429

Too Many Requests

Rate limit exceeded for your plan

504

Lite Server Timeout

Upstream TON liteserver timed out

422

Validation Error

BOC payload is malformed or invalid base64

500

Liteserver rejected message

Message failed validity checks (bad signature, insufficient gas, replay)

SDK Integration

Last updated

Was this helpful?