# 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 %}


---

# 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://doc.datagram.network/additional-tools/register-node-id.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.
