> For the complete documentation index, see [llms.txt](https://doc.datagram.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.datagram.network/additional-tools/register-node-id.md).

# Register Node ID

### Request

This endpoint registers an external ID to the Node ID whitelist. It supports requests using the following identifiers: `secret` and `id`.

**Endpoint:**

```
GET /api/v1/node/register
```

**URL:**

```
https://license.api.datagram.network
```

### Request Parameters

<table><thead><tr><th width="162.296875">Parameter</th><th width="90">Type</th><th width="108.265625">Required</th><th>Description </th><th width="203.9375">Example </th></tr></thead><tbody><tr><td>secret</td><td>string</td><td>✅ Yes</td><td>Unique secret token identifying partner.</td><td><code>"pt_sec_abc123XYZ*"</code></td></tr><tr><td><strong>id</strong></td><td>string</td><td>✅ Yes</td><td>Unique identifier of the external partner node.</td><td><code>"partner_98765zyxw"</code></td></tr></tbody></table>

{% hint style="warning" %}
You must provide both `secret` and `id` identifiers.
{% endhint %}

### Authentication

Use a valid organization token in the request header.

```
Authorization: Bearer <organization-token>
```

#### Example Request

```
POST /api/v1/node/register HTTP/1.1
Host: license.api.datagram.network
Authorization: <organization-token>
Content-Type: application/json

{
  "id": "external_id",
  "secret": "partner_secret_key"
}
```

### Responses

{% tabs %}
{% tab title="200 " %}
When the request is valid and successful, the API returns the boolean (true or false).

**Example Response**

```
{
  "data": true
}
```

{% endtab %}

{% tab title="400" %}
Returned when required parameters are missing or invalid or the time range exceeds 7 days.

**Response Body**

| Field       | Type    | Description               | Example              |
| ----------- | ------- | ------------------------- | -------------------- |
| **message** | string  | Description of the issue. | `INVALID_PARAMETERS` |
| **status**  | integer | HTTP status code.         | `400`                |

**Example Response**

```
{
  "error": {
    "message": "INVALID_PARAMETERS",
    "status": 400
  }
}
```

{% endtab %}

{% tab title="401" %}

Returned when the authorization token is missing or invalid.

**Response Body**

| Field       | Types   | Description                      | Example          |
| ----------- | ------- | -------------------------------- | ---------------- |
| **message** | string  | Explanation of the auth failure. | `"UNAUTHORIZED"` |
| **status**  | integer | HTTP status code.                | `401`            |

**Example Response**

```
{
  "error": {
    "message": "UNAUTHORIZED",
    "status": 401
  }
}
```

{% endtab %}
{% endtabs %}
