> For the complete documentation index, see [llms.txt](https://docs.nxtfi.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nxtfi.org/api-reference/submit-new-block.md).

# Submit new block

## Creates a new block

<mark style="color:orange;">`PUT`</mark> `https://test-001-node.cloud.nxtfi.tech/v2/newBlock`

#### Request Body

| Name                                        | Type   | Description                                                                                                                                           |
| ------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| prevhash<mark style="color:red;">\*</mark>  | String | Last recorded hash of the scope                                                                                                                       |
| height<mark style="color:red;">\*</mark>    | Number | Heght of the last block of the scope + 1                                                                                                              |
| version<mark style="color:red;">\*</mark>   | Number | API version                                                                                                                                           |
| data<mark style="color:red;">\*</mark>      | String | Block Content                                                                                                                                         |
| timestamp<mark style="color:red;">\*</mark> | Number | Timestamp in [Unix](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps) format |
| by<mark style="color:red;">\*</mark>        | String | Transaction Signer name                                                                                                                               |
| scope<mark style="color:red;">\*</mark>     | String | Scope name                                                                                                                                            |
| signature<mark style="color:red;">\*</mark> | String | <p>RSA-PSS signature of the object</p><p><code>{ prevHash, height, version, data, timestamp, scope }</code></p>                                       |
| hash<mark style="color:red;">\*</mark>      | String | Cryptographic hash (digest) encrypted with [SHA-256](https://en.wikipedia.org/wiki/SHA-2)                                                             |

{% tabs %}
{% tab title="200: OK Block successfully created" %}

{% endtab %}
{% endtabs %}

### Example in curl

{% tabs %}
{% tab title="Curl" %}

```bash
curl --location --request PUT 'https://test-001-node.cloud.nxtfi.tech/v2/newBlock' \
--header 'Content-Type: application/json' \
--data-raw '{
    "prevHash": "bd125e337f0cc7782b0e3465157b60535151362220f490650bed6b4be69bbb4b",
    "height": 14,
    "version": 2,
    "data": "Hello World!",
    "timestamp": 1676462543625,
    "scope": "DATA",
    "signature": "Vicd0mJ1mtXHleomOYsZ1oIZCeu+5P6EZLP/yRAABbvueTdMmJ1YbfnrbQ44ZJtAVwTI0NljyDoU62QvgnTEyCaJWwGR9URW+cAf15tupbkefJWrawmTOWuu3p4kBbOlF2Vk2oClnsUOpUrnzQ7AfdTa30bH87xpHLPUlvmxMw3Q3iCBH8908chKO/t/b7bI/8PGVDejYx13g2UCvJB0dcFHS8XAhAE0NwKpN33KVLCGAc5EoxLKF2mTCw5EejGxh19DbK05RbRZ8GL2j5MikyFlYVZexRIs6T3Rwr5zBacm1xw+P52WHRaDDHyAkVKd3XCvN6P18HRJWd5he+IOiw==",
    "by": "DATA",
    "hash": "d1966d2adabdcd65eb904dec2abc1179f02e2e6a5b3428e4ddf05d3a9a7a0276"
}'
```

{% endtab %}
{% endtabs %}

### Response

```javascript
{
    "verified": true,
    "queued": true
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nxtfi.org/api-reference/submit-new-block.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
