Submit a block.
POSThttp://127.0.0.1:14265/api/core/v3/blocks
Submit a block or a payload. This endpoint will return the identifier of the built block. Only full block is accepted.
Request
- application/json
- application/vnd.iota.serializer-v2
Body
required
allOf Block
Body
required
string
Responses
- 201
- 400
- 403
- 500
- 503
Successful operation.
Response Headers
- application/json
- Schema
- Example (from schema)
- default
Schema
blockId stringrequired
The block identifier of the submitted block. Hex-encoded with 0x prefix.
{
"blockId": "string"
}
{
"blockId": "0x0482f0eba39a23c9a13072c93d828b55543132c47f5f57514d9e55535e9d4f4f35000000"
}
Unsuccessful operation: indicates that the provided data is invalid.
- application/json
- Schema
- Example (from schema)
Schema
error objectrequired
{
"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
{
"error": {
"code": 403,
"message": "not available for public use"
}
}
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
{
"error": {
"code": 500,
"message": "internal server error"
}
}
Unsuccessful operation: indicates that the node can´t auto-fill the parents or perform Proof-of-Work.
- application/json
- Schema
- Example (from schema)
Schema
error objectrequired
{
"error": {
"code": 503,
"message": "service unavailable"
}
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST 'http://127.0.0.1:14265/api/core/v3/blocks' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"allOf": {
"header": {
"protocolVersion": 0,
"networkId": "string",
"issuingTime": "string",
"slotCommitmentId": "string",
"latestFinalizedSlot": 0,
"issuerId": "string"
},
"body": {
"type": 0,
"strongParents": [
"string"
],
"weakParents": [
"string"
],
"shallowLikeParents": [
"string"
],
"payload": {
"type": 0,
"transaction": {
"networkId": "string",
"creationSlot": 0,
"contextInputs": [
{
"type": 0,
"commitmentId": "string"
},
{
"type": 0,
"accountId": "string"
},
{
"type": 0,
"index": 0
}
],
"inputs": [
{
"type": 0,
"transactionId": "string",
"transactionOutputIndex": 0
}
],
"allotments": [
{
"accountId": "string",
"mana": "string"
}
],
"capabilities": "string",
"payload": {
"type": 0,
"tag": "string",
"data": "string"
},
"outputs": [
{
"type": 0,
"amount": "string",
"mana": "string",
"unlockConditions": [
{
"type": 0,
"address": {
"type": 0,
"pubKeyHash": "string"
}
},
{
"type": 0,
"returnAddress": {
"type": 0,
"pubKeyHash": "string"
},
"amount": "string"
},
{
"type": 0,
"slot": 0
},
{
"type": 0,
"returnAddress": {
"type": 0,
"pubKeyHash": "string"
},
"slot": 0
}
],
"features": [
{
"type": 0,
"address": {
"type": 0,
"pubKeyHash": "string"
}
},
{
"type": 0,
"entries": [
{
"did:iota": "0x68656c6c6f206469676974616c206175746f6e6f6d79"
},
{
"hello": "0x776f726c64"
}
]
},
{
"type": 0,
"tag": "string"
},
{
"type": 0,
"id": "string",
"amount": "string"
}
]
},
{
"type": 0,
"amount": "string",
"mana": "string",
"accountId": "string",
"foundryCounter": 0,
"unlockConditions": [
{
"type": 0,
"address": {
"type": 0,
"pubKeyHash": "string"
}
}
],
"features": [
{
"type": 0,
"address": {
"type": 0,
"pubKeyHash": "string"
}
},
{
"type": 0,
"entries": [
{
"did:iota": "0x68656c6c6f206469676974616c206175746f6e6f6d79"
},
{
"hello": "0x776f726c64"
}
]
},
{
"type": 6,
"blockIssuerKeys": [
{
"type": 0,
"publicKey": "string"
}
],
"expirySlot": "string"
},
{
"type": 7,
"stakedAmount": "string",
"fixedCost": "string",
"startEpoch": 0,
"endEpoch": 0
}
],
"immutableFeatures": [
{
"type": 0,
"address": {
"type": 0,
"pubKeyHash": "string"
}
},
{
"type": 0,
"entries": [
{
"did:iota": "0x68656c6c6f206469676974616c206175746f6e6f6d79"
},
{
"hello": "0x776f726c64"
}
]
}
]
},
{
"type": 0,
"amount": "string",
"mana": "string",
"anchorId": "string",
"stateIndex": 0,
"unlockConditions": [
{
"type": 0,
"address": {
"type": 0,
"pubKeyHash": "string"
}
},
{
"type": 0,
"address": {
"type": 0,
"pubKeyHash": "string"
}
}
],
"features": [
{
"type": 0,
"entries": [
{
"did:iota": "0x68656c6c6f206469676974616c206175746f6e6f6d79"
},
{
"hello": "0x776f726c64"
}
]
},
{
"type": 3,
"entries": [
{
"did:iota": "0x68656c6c6f206469676974616c206175746f6e6f6d79"
},
{
"hello": "0x776f726c64"
}
]
}
],
"immutableFeatures": [
{
"type": 0,
"address": {
"type": 0,
"pubKeyHash": "string"
}
},
{
"type": 0,
"entries": [
{
"did:iota": "0x68656c6c6f206469676974616c206175746f6e6f6d79"
},
{
"hello": "0x776f726c64"
}
]
}
]
},
{
"type": 0,
"amount": "string",
"serialNumber": 0,
"tokenScheme": [
{
"type": 0,
"mintedTokens": "string",
"meltedTokens": "string",
"maxSupply": "string"
}
],
"unlockConditions": [
{
"type": 0,
"address": {
"type": 0,
"accountId": "string"
}
}
],
"features": [
{
"type": 0,
"entries": [
{
"did:iota": "0x68656c6c6f206469676974616c206175746f6e6f6d79"
},
{
"hello": "0x776f726c64"
}
]
},
{
"type": 0,
"id": "string",
"amount": "string"
}
],
"immutableFeatures": [
{
"type": 0,
"entries": [
{
"did:iota": "0x68656c6c6f206469676974616c206175746f6e6f6d79"
},
{
"hello": "0x776f726c64"
}
]
}
]
},
{
"type": 0,
"amount": "string",
"mana": "string",
"nftId": "string",
"unlockConditions": [
{
"type": 0,
"address": {
"type": 0,
"pubKeyHash": "string"
}
},
{
"type": 0,
"returnAddress": {
"type": 0,
"pubKeyHash": "string"
},
"amount": "string"
},
{
"type": 0,
"slot": 0
},
{
"type": 0,
"returnAddress": {
"type": 0,
"pubKeyHash": "string"
},
"slot": 0
}
],
"features": [
{
"type": 0,
"address": {
"type": 0,
"pubKeyHash": "string"
}
},
{
"type": 0,
"entries": [
{
"did:iota": "0x68656c6c6f206469676974616c206175746f6e6f6d79"
},
{
"hello": "0x776f726c64"
}
]
},
{
"type": 0,
"tag": "string"
}
],
"immutableFeatures": [
{
"type": 0,
"address": {
"type": 0,
"pubKeyHash": "string"
}
},
{
"type": 0,
"entries": [
{
"did:iota": "0x68656c6c6f206469676974616c206175746f6e6f6d79"
},
{
"hello": "0x776f726c64"
}
]
}
]
},
{
"type": 5,
"amount": "100",
"delegatedAmount": "string",
"delegationId": "0x1505ec099896ab05d9e08fbc7101ae4dff0093b3943b28f789ed2ca728bcc8d6",
"validatorAddress": "0x1505ec099896ab05d9e08fbc7101ae4dff0093b3943b28f789ed2ca728bcc8d6",
"startEpoch": "10",
"endEpoch": "12",
"unlockConditions": [
{
"type": 0,
"address": {
"type": 0,
"pubKeyHash": "string"
}
}
]
}
]
},
"unlocks": [
{
"type": 0,
"signature": {
"type": 0,
"publicKey": "string",
"signature": "string"
}
},
{
"type": 0,
"reference": 0
},
{
"type": 0,
"reference": 0
},
{
"type": 0,
"reference": 0
}
]
},
"maxBurnedMana": "string"
},
"signature": {
"type": 0,
"publicKey": "string",
"signature": "string"
}
}
}'
ResponseClear