> For the complete documentation index, see [llms.txt](https://docs.bloq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bloq.com/advanced-documentation/technical-reference/nodes-api.md).

# Nodes API

{% hint style="success" %}
**TIP**

Clusters utilize the same API as Bloq Nodes. To interact with your node clusters, change the `/nodes/` path in the API URL to `/clusters/`.
{% endhint %}

Jump to:

* [DELETE /users/me/nodes/{id}](#delete-users-me-nodes-id)
* [GET /chains](#get-chains)
* [GET /users/me/nodes](#get-users-me-nodes)
* [GET /users/me/nodes/{id}](#get-users-me-nodes-id)
* [POST /users/me/nodes](#post-users-me-nodes)

## GET /chains

This resource lists the chains and versions available for creating new nodes.

### Responses

| Status | Meaning                                                 | Description          |
| ------ | ------------------------------------------------------- | -------------------- |
| 200    | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Successful operation |

### Example responses

> 200 Response

```json
[
  {
    "chain": "bch",
    "network": "mainnet",
    "software": "abc-0.19"
  },
  {
    "chain": "bch",
    "network": "testnet",
    "software": "abc-0.19"
  },
  {
    "chain": "btc",
    "network": "mainnet",
    "software": "core-0.17"
  },
  {
    "chain": "btc",
    "network": "testnet",
    "software": "core-0.17"
  }
  {
    "chain": "eth",
    "network": "mainnet",
    "software": "geth-1.8"
  },
  {
    "chain": "ltc",
    "network": "mainnet",
    "software": "litecoin-0.17"
  }
]
```

### Code sample

```shell
curl -X GET https://nodes.bloq.cloud/chains
```

## POST /users/me/nodes

This resource creates a new node.

### Parameters

| Name  | In   | Type    | Required | Description                                                                                       |
| ----- | ---- | ------- | -------- | ------------------------------------------------------------------------------------------------- |
| image | body | string  | true     | Blockchain id. `btc`, `bch`, `ltc`, `btctestnet`, `bchtestnet`, and `eth` are currently supported |
| large | body | boolean | false    | Set true to request a larger/faster node.                                                         |
| jwt   | body | boolean | false    | Use jwt Bearer token for auth.                                                                    |

> Body parameter

```json
{
  "image": "btc",
  "large": false,
  "jwt:" false
}
```

### Responses

| Status | Meaning                                                 | Description          |
| ------ | ------------------------------------------------------- | -------------------- |
| 200    | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Successful operation |

**Example responses**

> 200 Response

```json
{
  "user": "user-xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "id": "node-xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "image": "btc",
  "version": "core-0.17",
  "state": "started",
  "nodeUser": "xxxxxxxxxx",
  "nodePass": "xxxxxxxxxx",
  "instance": {
    "vendor": "aws",
    "id": "i-032155ff0235d2dbb",
    "imageId": "ami-021e0f4b36b068ccb",
    "type": "t2.large"
  },
  "startedAt": "2019-03-27T18:40:19.878Z"
}
```

### Code sample

```shell
curl -X POST https://nodes.bloq.cloud/users/me/nodes \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <AUTH_TOKEN>'
  -d '{
   "image": "btc"
  }'
```

## GET /users/me/nodes

This resource list created nodes

### Responses

| Status | Meaning                                                 | Description          | Schema |
| ------ | ------------------------------------------------------- | -------------------- | ------ |
| 200    | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Successful operation | Inline |

**Example responses**

> 200 Response

```json
[
  {
    "stoppedAt": "2020-04-21T05:00:18.586Z",
    "serviceData": {
      "amiPrefix": "btc",
      "performance": "standard",
      "software": "core-0.17",
      "ports": [8080, 8332]
    },
    "ip": "18.213.193.254",
    "createdAt": "2020-04-21T00:45:07.687Z",
    "ttl": "1588050018",
    "user": "user-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "userPlanData": {
      "startsAt": "2020-04-21T00:45:05.324Z",
      "id": "user-plan-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "plan": "plan-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "expiresAt": "2020-05-21T00:45:05.324Z"
    },
    "instance": {
      "region": "us-east-1",
      "id": "i-02cb186c0808950f6",
      "imageId": "ami-01ee6543215d4006b"
    },
    "vendor": {
      "name": "aws",
      "subnet": "subnet-41daba24",
      "securityGroups": [
        "sg-50d39921",
        "sg-0a52e56ee0c02fd7a",
        "sg-784d5703",
        "sg-0769b9650222e64ce"
      ],
      "region": "us-east-1",
      "instanceType": "t3.large",
      "quickSync": true
    },
    "network": "mainnet",
    "state": "stopped",
    "service": "service-f409a426-8bdd-5c65-bcd3-7c6d0424a5ac",
    "auth": {
      "type": "basic",
      "user": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "pass": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    },
    "updatedAt": "2020-04-21T00:45:09.419Z",
    "chain": "btc",
    "id": "node-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  },
  {
    "stoppedAt": "2020-04-21T05:00:18.586Z",
    "serviceData": {
      "amiPrefix": "btc",
      "performance": "standard",
      "software": "core-0.17",
      "ports": [8080, 8332]
    },
    "ip": "18.213.193.254",
    "createdAt": "2020-04-21T00:45:07.687Z",
    "ttl": "1588050018",
    "user": "user-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "userPlanData": {
      "startsAt": "2020-04-21T00:45:05.324Z",
      "id": "user-plan-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "plan": "plan-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "expiresAt": "2020-05-21T00:45:05.324Z"
    },
    "instance": {
      "region": "us-east-1",
      "id": "i-02cb186c0808950f6",
      "imageId": "ami-01ee6543215d4006b"
    },
    "vendor": {
      "name": "aws",
      "subnet": "subnet-41daba24",
      "securityGroups": [
        "sg-50d39921",
        "sg-0a52e56ee0c02fd7a",
        "sg-784d5703",
        "sg-0769b9650222e64ce"
      ],
      "region": "us-east-1",
      "instanceType": "t3.large",
      "quickSync": true
    },
    "network": "mainnet",
    "state": "stopped",
    "service": "service-f409a426-8bdd-5c65-bcd3-7c6d0424a5ac",
    "auth": {
      "type": "basic",
      "user": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "pass": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    },
    "updatedAt": "2020-04-21T00:45:09.419Z",
    "chain": "btc",
    "id": "node-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  }
]
```

### Code sample

```shell
curl -X GET https://nodes.bloq.cloud/users/me/nodes \
  -H 'Authorization: Bearer <AUTH_TOKEN>'
```

## GET /users/me/nodes/{id}

This resource fetches a node by ID.

### Responses

| Status | Meaning                                                 | Description          | Schema |
| ------ | ------------------------------------------------------- | -------------------- | ------ |
| 200    | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Successful operation | Inline |

**Example responses**

> 200 Response

```json
{
  "stoppedAt": "2020-04-21T05:00:18.586Z",
  "serviceData": {
    "amiPrefix": "btc",
    "performance": "standard",
    "software": "core-0.17",
    "ports": [8080, 8332]
  },
  "ip": "18.213.193.254",
  "createdAt": "2020-04-21T00:45:07.687Z",
  "ttl": "1588050018",
  "user": "user-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "userPlanData": {
    "startsAt": "2020-04-21T00:45:05.324Z",
    "id": "user-plan-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "plan": "plan-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "expiresAt": "2020-05-21T00:45:05.324Z"
  },
  "instance": {
    "region": "us-east-1",
    "id": "i-02cb186c0808950f6",
    "imageId": "ami-01ee6543215d4006b"
  },
  "vendor": {
    "name": "aws",
    "subnet": "subnet-41daba24",
    "securityGroups": [
      "sg-50d39921",
      "sg-0a52e56ee0c02fd7a",
      "sg-784d5703",
      "sg-0769b9650222e64ce"
    ],
    "region": "us-east-1",
    "instanceType": "t3.large",
    "quickSync": true
  },
  "network": "mainnet",
  "state": "stopped",
  "service": "service-f409a426-8bdd-5c65-bcd3-7c6d0424a5ac",
  "auth": {
    "type": "basic",
    "user": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "pass": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  },
  "updatedAt": "2020-04-21T00:45:09.419Z",
  "chain": "btc",
  "id": "node-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```

### Code sample

```shell
curl -X GET https://nodes.bloq.cloud/users/me/nodes/node-xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
  -H 'Authorization: Bearer <AUTH_TOKEN>'
```

## DELETE /users/me/nodes/{id}

This resource removes a node by ID.

### Responses

| Status | Meaning                                                 | Description          | Schema |
| ------ | ------------------------------------------------------- | -------------------- | ------ |
| 200    | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Successful operation | Inline |

### Code sample

```shell
curl -X DELETE https://nodes.bloq.cloud/users/me/nodes/node-xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
  -H 'Authorization: Bearer <AUTH_TOKEN>'
```


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.bloq.com/advanced-documentation/technical-reference/nodes-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
