Skip to main content
POST
/
api
/
v3
/
decode
Decode opcodes and bodies
curl --request POST \
  --url https://toncenter.com/api/v3/decode \
  --header 'Content-Type: application/json' \
  --data '
{
  "bodies": [
    "<string>"
  ],
  "opcodes": [
    "<string>"
  ]
}
'
{
  "bodies": [
    {}
  ],
  "opcodes": [
    "<string>"
  ]
}

Body

application/json

Request body for the decode endpoint. Accepts lists of opcodes (hex or decimal format) and message bodies (base64 or hex format) to be decoded into human-readable form.

bodies
string[]

List of message bodies to decode. Each body should be a base64-encoded or hex-encoded BOC. Maximum 1000 items.

opcodes
string[]

List of opcodes to decode into human-readable names. Each opcode can be in hex format (with or without 0x prefix) or decimal format. Maximum 1000 items.

Response

Decoded opcodes and message bodies.

Response from the decode endpoint containing decoded opcode names and parsed message body structures.

bodies
object[]

Array of decoded message bodies. Each entry is a structured object with the decoded opcode name and parsed payload fields. Entries that could not be decoded return the raw data.

opcodes
string[]

Array of decoded opcode names corresponding to the input opcodes. Unknown opcodes return the original value unchanged.