Returns message data as JSON by its identifier.
GET/api/v1/messages/:messageId
Find a message by its identifer. This endpoint returns the given message as JSON.
Request
Path Parameters
Identifier of the message.
Responses
- 200
- 400
- 403
- 404
- 500
Successful operation.
- application/json
- Schema
- Example (from schema)
- Empty Payload
- Transaction Payload
- Milestone Payload
- Indexation Payload
Schema
- TransactionPayload
- MilestonePayload
- IndexationPayload
- ReceiptPayload
- TransactionEssence
- Array [
- UTXOInput
- ]
- Array [
- SigLockedSingleOutput
- SigLockedDustAllowanceOutput
- Ed25519Address
- Ed25519Address
- ]
- IndexationPayload
- Array [
- SignatureUnlockBlock
- ReferenceUnlockBlock
- Ed25519Signature
- ]
- Array [
- Ed25519Address
- ]
data objectrequired
allOf Message
A message is the object nodes gossip around in the network. It always references two other messages that are known as parents. It is stored as a vertex on the tangle data structure that the nodes maintain. A message can have a maximum size of 32Kb.
Network identifier. This field signifies for which network the message is meant for. It also tells which protocol rules apply to the message. It is computed out of the first 8 bytes of the BLAKE2b-256
hash of the concatenation of the network type and protocol version string.
The identifiers of the messages this message references.
payload objectrequired
Set to value 0 to denote a Transaction Payload.
essence objectrequired
Set to value 0 to denote a Transaction Essence.
inputs object[]required
Set to value 0 to denote an UTXO Input.
The BLAKE2b-256 hash of the transaction from which the UTXO comes from.
The index of the output on the referenced transaction to consume.
outputs object[]required
Set to value 0 to denote a SigLockedSingleOutput.
address objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded BLAKE2b-256 hash of the Ed25519 public key.
The amount of tokens to deposit with this SigLockedSingleOutput output.
Set to value 1 to denote a SigLockedDustAllowanceOutput.
address objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded BLAKE2b-256 hash of the Ed25519 public key.
The amount of tokens to deposit with this SigLockedDustAllowanceOutput output.
payload objectnullablerequired
Set to value 2 to denote a Indexation Payload.
The indexation key to find/look up this message. It has a size between 1 and 64 bytes and must be encoded as a hex-string.
The optional data to attach. This may have a length of 0.
unlockBlocks object[]required
Denotes a Signature Unlock Block.
signature objectrequired
Set to value 0 to denote an Ed25519 Signature.
The public key of the Ed25519 keypair which is used to verify the signature.
The signature signing the serialized Transaction Essence.
Set to value 1 to denote a Reference Unlock Block.
Represents the index of a previous unlock block.
Set to value 1 to denote a Milestone Payload.
The index of the milestone.
The Unix timestamp at which the milestone was issued. The unix timestamp is specified in seconds.
The identifiers of the messages this milestone references.
256-bit hash based on the message IDs of all the not-ignored state-mutating transactions referenced by the milestone.
An array of public keys to validate the signatures. The keys must be in lexicographical order.
An array of signatures signing the serialized Milestone Essence. The signatures must be in the same order as the specified public keys.
Set to value 2 to denote a Indexation Payload.
The indexation key to find/look up this message. It has a size between 1 and 64 bytes and must be encoded as a hex-string.
The optional data to attach. This may have a length of 0.
funds MigratedFundsEntry[]required
address objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded BLAKE2b-256 hash of the Ed25519 public key.
transaction TreasuryTransactionPayloadrequired
Set to value 4 to denote a Treasury Payload.
input TreasuryInput
Set to value 1 to denote a TreasuryInput.
output TreasuryOutput
Set to value 2 to denote a TreasuryOutput.
The nonce which lets this message fulfill the Proof-of-Work requirement.
{
"data": {
"allOf": {
"networkId": "string",
"parentMessageIds": [
"string"
],
"nonce": "string"
}
}
}
{
"data": {
"networkId": "6530425480034647824",
"parentMessageIds": [
"c0b728d4c292860b57747c7bfbd989ccc40be8c76229022644c05e1352bf1ea3",
"e8db39681478cf9826bd2f31d045f16f5e1f478c5abc3030419da7911df9e288"
],
"payload": null,
"nonce": "1481"
}
}
{
"data": {
"networkId": "9466822412763346725",
"parentMessageIds": [
"6c5bc96948813faaf6d5a5f0c6bc453bf2e5343664884aea2873041bdc47c4ca",
"97e2c4fce0f6e1023c19ed634e37a44744e21a743a79e8f1fc16d31dc8f47481",
"c107c5f3d6189954c9b1b8e2fa556db4bcf7ad2da717d328ecf6d9a841a5f37d",
"ea19397d2670f904c4d8c8616ef7a0724321512f1c09f8eb2aeb0cc4299e2441"
],
"payload": {
"type": 0,
"essence": {
"type": 0,
"inputs": [
{
"type": 0,
"transactionId": "0c78e998f5177834ecb3bae1596d5056af76e487386eecb19727465b4be86a79",
"transactionOutputIndex": 0
},
{
"type": 0,
"transactionId": "309b169bfa60c8cf80afd730741862d200405d5df7cabfe9b564361dce1f7036",
"transactionOutputIndex": 0
},
{
"type": 0,
"transactionId": "c138ecdc882010245e9574fbc1f1f43cc7c182fa890e46e018365dd49de0f16e",
"transactionOutputIndex": 0
}
],
"outputs": [
{
"type": 0,
"address": {
"type": 0,
"address": "d49931814e6bfbb8e221f1b2936e206e5a6b6abeb9c070f8603814c525c9abe3"
},
"amount": 50000000
}
],
"payload": null
},
"unlockBlocks": [
{
"type": 0,
"signature": {
"type": 0,
"publicKey": "40d0c00fd629a5f528e4bcab4333926a90d06613a3f36a325defcdaf4c9e4092",
"signature": "ed4a63a3e1b22c85f9813b00a21c8576ed72c1f5bc939d01fcea7dcd678c2d0d8d80a2499965d8ce5574c9e92aa0d42b72b969bab3a2a35fe7dbc64659a0d703"
}
},
{
"type": 1,
"reference": 0
},
{
"type": 1,
"reference": 0
}
]
},
"nonce": "1020884"
}
}
{
"data": {
"networkId": "14379272398717627559",
"parentMessageIds": [
"23d388b13f64c2e24788d61891079c74daf6d036b768d75ad38e473c9d4da83b",
"242974b25cab6f8378fe718ea729fa65492f03df4ce74b631899589242fa12b7",
"2a331c562b48e261c11f073c7465551ffcc80c35ab6d09f4fd1cc81782e5fdc1",
"438a14a651b8872896b4e57c92041e8962ca7d78cc38c774534020feefeff31a",
"73c90398fb548a4410b49264e182e58a91baeecaa949cbfc1d01a9066cbd9935",
"b9adfdc1effd3242b5c1d7b6df43d4b53e58943e820ced89c7dd39b8b52fcef0"
],
"payload": {
"type": 1,
"index": 16241,
"timestamp": 1617959712,
"parentMessageIds": [
"23d388b13f64c2e24788d61891079c74daf6d036b768d75ad38e473c9d4da83b",
"242974b25cab6f8378fe718ea729fa65492f03df4ce74b631899589242fa12b7",
"2a331c562b48e261c11f073c7465551ffcc80c35ab6d09f4fd1cc81782e5fdc1",
"438a14a651b8872896b4e57c92041e8962ca7d78cc38c774534020feefeff31a",
"73c90398fb548a4410b49264e182e58a91baeecaa949cbfc1d01a9066cbd9935",
"b9adfdc1effd3242b5c1d7b6df43d4b53e58943e820ced89c7dd39b8b52fcef0"
],
"inclusionMerkleProof": "0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8",
"nextPoWScore": 0,
"nextPoWScoreMilestoneIndex": 0,
"publicKeys": [
"7205c145525cee64f1c9363696811d239919d830ad964b4e29359e6475848f5a",
"e468e82df33d10dea3bd0eadcd7867946a674d207c39f5af4cc44365d268a7e6"
],
"receipt": null,
"signatures": [
"a642e96f71094f8523790131481e0fbfdc8265caa8e4b08793628b286065c317a5595d56edb5e918b24d4ee749768a2b5ae6010e751bf31f0d8145a390b82c00",
"4bdfa2684bed01ce3a9a630b0688e868c290b8524c679daa79cb9d9f0f2aa5c57cf00a0fc694d1fed3696053ffa9bba6154ccb1564532cd49f807ba77de9a70c"
]
},
"nonce": "1229782938247321090"
}
}
{
"data": {
"networkId": "9466822412763346725",
"parentMessageIds": [
"222e88a63e5aca8ef48d3b8749e2fab51d1bc7c34c5604a2933ca2f180b342c9",
"a22137ebe61435c6d0f3e16ad148376778d7bfb36e27329f02c221ec109525a6",
"a6db9d0b3ecb274d90c21e9dde04012b2d13ad8aa0b90e82e7d3b626be67119d",
"fd31d9c926b5d97ae016535d66baee511dfa3b713b61d8eba2ae5c9929e38ca7"
],
"payload": {
"type": 2,
"index": "68656c6c6f20776f726c64",
"data": "5370616d6d696e6720646174612e0a436f756e743a203037323935320a54696d657374616d703a20323032312d30322d31315431303a32333a34392b30313a30300a54697073656c656374696f6e3a203934c2b573"
},
"nonce": "2102864"
}
}
Unsuccessful operation: indicates that the provided data is invalid.
- application/json
- Schema
- Example (from schema)
Schema
error objectrequired
The application error code.
The error reason.
{
"error": {
"code": 400,
"message": "invalid data provided"
}
}
Unsuccessful operation: indicates that the endpoint is not available for public use.
- application/json
- Schema
- Example (from schema)
Schema
error objectrequired
The application error code.
The error reason.
{
"error": {
"code": 403,
"message": "not available for public use"
}
}
Unsuccessful operation: indicates that the requested data was not found.
- application/json
- Schema
- Example (from schema)
Schema
error objectrequired
The application error code.
The error reason.
{
"error": {
"code": 404,
"message": "could not find data"
}
}
Unsuccessful operation: indicates that an unexpected, internal server error happened which prevented the node from fulfilling the request.
- application/json
- Schema
- Example (from schema)
Schema
error objectrequired
The application error code.
The error reason.
{
"error": {
"code": 500,
"message": "internal server error"
}
}