curl --request POST \
--url https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/sendQuery \
--header 'Content-Type: application/json' \
--data '
{
"address": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs",
"body": "te6cckEBAQEAAgAAAEysuc0=",
"init_code": "<string>",
"init_data": "<string>"
}
'{
"ok": true,
"result": {
"@type": "<string>",
"@extra": "<string>"
}
}curl --request POST \
--url https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/sendQuery \
--header 'Content-Type: application/json' \
--data '
{
"address": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs",
"body": "te6cckEBAQEAAgAAAEysuc0=",
"init_code": "<string>",
"init_data": "<string>"
}
'{
"ok": true,
"result": {
"@type": "<string>",
"@extra": "<string>"
}
}sendQuery method sends an unpacked external message to the TON blockchain. Unlike sendBoc which requires a fully serialized BoC, this method accepts individual message components and constructs the message on the server side.
address (string, required) — The destination address for the message. Example: EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs.body (string, required) — The body of the message in base64 format.init_code (string, optional) — The init code in base64 format. Required when deploying a new contract.init_data (string, optional) — The init data in base64 format. Required when deploying a new contract.curl -X POST \
'https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/jsonRPC' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "sendQuery",
"params": {
"address": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs",
"body": "te6cckEBAQEAAgAAAEysuc0="
}
}'
ok (boolean) — Whether the operation was successful.
result (object) — The result of the operation. Contains:
@type (string) — The type of the result, typically ok for successful submissions.@extra (string) — Extra information about the operation.sendQuery method is useful when you have the message components but haven’t serialized them into a BoC:
curl -X 'POST' \
'https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/sendQuery' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"address": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs",
"body": "te6cckEBAQEAAgAAAEysuc0=",
"init_code": "te6cckEBAQEAXAAAsFF/APSkE/S88sgL...",
"init_data": "te6cckEBAQEAJAAAQ4AW..."
}'
sendQuery when working with systems that provide unpacked message components.The destination address for the message
The body of the message in base64 format
Optional init code in base64 format for contract deployment
Optional init data in base64 format for contract deployment
Was this page helpful?