- APIs
- Stacks Blockchain API
- Upload Block
Upload block
RPC node
Upload a block to the node.
POST
Parameters
Query Parameters
broadcast
string If set to `"1"` the node will broadcast the uploaded block to peers.
When present the request must include a valid `Authorization` header.
Body
application/octet-streamstring (binary)
Binary SIP-003 encoding of a `NakamotoBlock`
Status code | Description |
---|---|
200 | Block upload result. |
400 | Bad request |
401 | Unauthorized. Invalid or missing authentication token. |
500 | Internal Server Error |
cURL
curl -L -X POST \"https://api.hiro.so/v3/blocks/upload?broadcast={broadcast}" \-H 'Accept: application/json'
Response
{"stacks_block_id": "abc123...","accepted": true}