# Validator

## Host a validator (with private key)

<mark style="color:green;">`POST`</mark> `https://www.allnodes.com/api/v1/node/hosting`

This endpoint allows you to host new validator.

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer TOKEN |

#### Request Body

| Name                                             | Type   | Description                                                                                                                                                                                   |
| ------------------------------------------------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| currencySymbol<mark style="color:red;">\*</mark> | string | Must be "ETH"                                                                                                                                                                                 |
| privateKey<mark style="color:red;">\*</mark>     | string | Validator private key in HEX (not withdrawal private key)                                                                                                                                     |
| network<mark style="color:red;">\*</mark>        | string | "mainnet" \| "pyrmont" \| "prater"                                                                                                                                                            |
| graffiti<mark style="color:red;">\*</mark>       | string | Graffiti of your new validator (not more than 17 bytes)                                                                                                                                       |
| relayId                                          | string | <p>MEV-Boost Relay of your new validator. Possible options:<br>\* "flashbots"<br>\* "ultrasound"<br>\* "maxprofit" (Enterprise plan required)<br>\* null (this option disables MEV-Boost)</p> |
| planType                                         | string | <p>Pricing plan. Possible options:<br>\* "advanced" (default)<br>\* "enterprise"</p>                                                                                                          |

{% tabs %}
{% tab title="201: Validator was successfully hosted." %}

```javascript
{
  id: string;
  ip: string;
  name: string;
  currencySymbol: string;
  createdAt: string;
  payoutFrequencySeconds: number;
  apr: string;
  instance: {
    version: string;
    status: string;
    uptimeSeconds: number | null;
    nodeId: number | null;
  };
  address: {
    rewardOwner: string;
    rewardsEarned: number;
    signingPublicKey: string;
  };
}
```

{% endtab %}

{% tab title="400: Bad Request Example of error response." %}

```javascript
{
  "error": "INVALID_GRAFFITI"
}
```

{% endtab %}
{% endtabs %}

## Host a validator (with keystore and password)

<mark style="color:green;">`POST`</mark> `https://www.allnodes.com/api/v1/node/hosting`

This endpoint allows you to host new validator.

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer TOKEN |

#### Request Body

| Name                                             | Type   | Description                                                                                                                                                                                   |
| ------------------------------------------------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| currencySymbol<mark style="color:red;">\*</mark> | string | Must be "ETH"                                                                                                                                                                                 |
| keystore<mark style="color:red;">\*</mark>       | object | Your keystore content in JSON                                                                                                                                                                 |
| password<mark style="color:red;">\*</mark>       | string | Your keystore password                                                                                                                                                                        |
| networkName<mark style="color:red;">\*</mark>    | string | "mainnet" \| "pyrmont" \| "prater"                                                                                                                                                            |
| graffiti<mark style="color:red;">\*</mark>       | string | Graffiti of your new validator (not more than 17 bytes)                                                                                                                                       |
| relayId                                          | string | <p>MEV-Boost Relay of your new validator. Possible options:<br>\* "flashbots"<br>\* "ultrasound"<br>\* "maxprofit" (Enterprise plan required)<br>\* null (this option disables MEV-Boost)</p> |
| planType                                         | string | <p>Pricing plan. Possible options:<br>\* "advanced" (default)<br>\* "enterprise"</p>                                                                                                          |

{% tabs %}
{% tab title="201: Validator was successfully hosted." %}

```javascript
{
  id: string;
  ip: string;
  name: string;
  currencySymbol: string;
  createdAt: string;
  payoutFrequencySeconds: number;
  apr: string;
  instance: {
    version: string;
    status: string;
    uptimeSeconds: number | null;
    nodeId: number | null;
  };
  address: {
    rewardOwner: string;
    rewardsEarned: number;
    signingPublicKey: string;
  };
}
```

{% endtab %}

{% tab title="400: Bad Request Example of error response." %}

```javascript
{
  "error": "INVALID_GRAFFITI"
}
```

{% endtab %}
{% endtabs %}

## Get message to sign for Fee Recipient address change

<mark style="color:blue;">`GET`</mark> `https://www.allnodes.com/api/v1/node/{id}/fee-recipient/sign-message`

Use this endpoint before changing Fee Recipient address.

#### Path Parameters

| Name                                 | Type   | Description                                                                                                |
| ------------------------------------ | ------ | ---------------------------------------------------------------------------------------------------------- |
| id<mark style="color:red;">\*</mark> | string | Node for which you want to change Fee Recipient address. ID can be extracted from the “Get all nodes” call |

#### Query Parameters

| Name                                      | Type   | Description                    |
| ----------------------------------------- | ------ | ------------------------------ |
| address<mark style="color:red;">\*</mark> | string | Your new Fee Recipient address |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer TOKEN |

{% tabs %}
{% tab title="200: OK " %}

```json
{
  message: string;
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```json
{
  "error": "INVALID_ADDRESS"
}
```

{% endtab %}
{% endtabs %}

## Change Fee Recipient address

<mark style="color:orange;">`PUT`</mark> `https://www.allnodes.com/api/v1/node/{id}/fee-recipient`

This endpoint allows you to change Fee Recipient address of your validator.

#### Path Parameters

| Name                                 | Type   | Description                                                                                                |
| ------------------------------------ | ------ | ---------------------------------------------------------------------------------------------------------- |
| id<mark style="color:red;">\*</mark> | string | Node for which you want to change Fee Recipient address. ID can be extracted from the “Get all nodes” call |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer TOKEN |

#### Request Body

| Name                                        | Type   | Description                                                              |
| ------------------------------------------- | ------ | ------------------------------------------------------------------------ |
| message<mark style="color:red;">\*</mark>   | string | Message to sign                                                          |
| signature<mark style="color:red;">\*</mark> | string | ECDSA signature (HEX). Must be signed by deposit or withdrawal addresses |
| address<mark style="color:red;">\*</mark>   | string | Your new Fee Recipient address                                           |

{% tabs %}
{% tab title="200: OK " %}

```json
{
  nodeId: string;
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```json
{
  "error": "INVALID_ADDRESS"
}
```

{% endtab %}
{% endtabs %}

## Change MEV-Boost Relay

<mark style="color:orange;">`PUT`</mark> `https://www.allnodes.com/api/v1/node/{id}/relay`

This endpoint allows you to change MEV-Boost Relay of your validator.

#### Path Parameters

| Name                                 | Type   | Description                                                                                          |
| ------------------------------------ | ------ | ---------------------------------------------------------------------------------------------------- |
| id<mark style="color:red;">\*</mark> | string | Node for which you want to change MEV-Boost Relay. ID can be extracted from the “Get all nodes” call |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer TOKEN |

#### Request Body

| Name                                      | Type   | Description                                                                                                                                                                                   |
| ----------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| relayId<mark style="color:red;">\*</mark> | string | <p>MEV-Boost Relay of your new validator. Possible options:<br>\* "flashbots"<br>\* "ultrasound"<br>\* "maxprofit" (Enterprise plan required)<br>\* null (this option disables MEV-Boost)</p> |

{% tabs %}
{% tab title="200: OK " %}

```json
{
  nodeId: string;
  newRelay: string;
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```json
{
  "error": "INVALID_RELAY_ID"
}
```

{% endtab %}
{% endtabs %}

## Get message to sign for Voluntary Exit request

<mark style="color:blue;">`GET`</mark> `https://www.allnodes.com/api/v1/node/{id}/voluntary-exit/sign-message`

Use this endpoint before requesting Voluntary Exit.

#### Path Parameters

| Name                                 | Type   | Description                                                              |
| ------------------------------------ | ------ | ------------------------------------------------------------------------ |
| id<mark style="color:red;">\*</mark> | string | Node you want to exit. ID can be extracted from the “Get all nodes” call |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer TOKEN |

{% tabs %}
{% tab title="200: OK " %}

```json
{
  message: string;
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```json
{
  "error": "VOLUNTARY_EXIT_ALREADY_REQUESTED"
}
```

{% endtab %}
{% endtabs %}

## Request Voluntary Exit

<mark style="color:green;">`POST`</mark> `https://www.allnodes.com/api/v1/node/{id}/voluntary-exit`

This endpoint allows you to request Voluntary Exit of your validator.

#### Path Parameters

| Name                                 | Type   | Description                                                              |
| ------------------------------------ | ------ | ------------------------------------------------------------------------ |
| id<mark style="color:red;">\*</mark> | string | Node you want to exit. ID can be extracted from the “Get all nodes” call |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer TOKEN |

#### Request Body

| Name                                        | Type   | Description                                                              |
| ------------------------------------------- | ------ | ------------------------------------------------------------------------ |
| message<mark style="color:red;">\*</mark>   | string | Message to sign                                                          |
| signature<mark style="color:red;">\*</mark> | string | ECDSA signature (HEX). Must be signed by deposit or withdrawal addresses |

{% tabs %}
{% tab title="201: Created " %}

```json
{
  nodeId: string;
}
```

{% endtab %}

{% tab title="403: Forbidden " %}

```
{
  "error": "VERIFICATION_FAILED"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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.allnodes.com/eth/validator.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.
