> For the complete documentation index, see [llms.txt](https://docs.luganodes.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.luganodes.com/apis/staking-apis-v1/authentication.md).

# Authentication

* [Sign up](#sign-up)
* [Generate new API Key](#generate-api-key)

## API URL

| URL                                                                                                    | Environment |
| ------------------------------------------------------------------------------------------------------ | ----------- |
| [https://staking.luganodes.com/](https://staking.luganodes.com/sui/api/rewards/daily?page=1\&limit=50) | Mainet      |

{% hint style="info" %}
For ETH, please follow a seperate authentication guide [here](/apis/ethereum/authentication.md)
{% endhint %}

## Sign up&#x20;

<mark style="color:green;">`POST`</mark> `/api/public/register`

Create an account for your organization with Luganodes. Please contact <hello@luganodes.com> in order to approve your organization and receive an API key

#### Request Body

| Name                                               | Type   | Description                             |
| -------------------------------------------------- | ------ | --------------------------------------- |
| orgName<mark style="color:red;">\*</mark>          | String | Organization Name                       |
| email<mark style="color:red;">\*</mark>            | String | Organization email                      |
| password<mark style="color:red;">\*</mark>         | String | Password for organization account       |
| allowedAddresses<mark style="color:red;">\*</mark> | Object | Object containing whitelisted addresses |

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

```javascript
{
    "success": true,
    "pendingUser": {
        "id": "685268e0eee306e885c6ee88",
        "orgName": "Test Organization",
        "email": "test@gmail.com",
        "allowedAddresses": {
            "ethereum": [
                "0x742d35Cc6634C0532925a3b8D03C29f33da7A0d1"
            ],
            "bitcoin": [
                "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
            ]
        },
        "createdAt": "2025-06-18T07:21:04.525Z"
    },
    "message": "User registration submitted successfully. Awaiting admin approval."
}
```

{% endtab %}
{% endtabs %}

#### Sample Request

```bash
curl --location '{{url}}/api/public/register' \
--header 'Content-Type: application/json' \
--data-raw '{
  "orgName": "Test Organization",
  "email": "testuser@example.com",
  "password": "TestPass123!@#",
  "allowedAddresses": {
    "ethereum": ["0x742d35C36634C0532925a3b8D03C29f33da7A0d1"],
    "bitcoin": ["1A1zP1eP5aGefi2DMPTfTL5SLmv7DivfNa"]
  }
}'
```

#### Response Object

<table><thead><tr><th width="166.33333333333331">Property</th><th width="480">Description</th><th>Type</th></tr></thead><tbody><tr><td>success</td><td>API response status</td><td>Boolean</td></tr><tr><td>message</td><td>Request response message</td><td>String</td></tr><tr><td>pendingUser</td><td>Object containing api key</td><td>Object</td></tr></tbody></table>

#### Pending User Object

<table><thead><tr><th width="166.33333333333331">Property</th><th width="270.51171875">Description</th><th>Type</th></tr></thead><tbody><tr><td>id</td><td>Organization ID</td><td>String</td></tr><tr><td>orgName</td><td>Organization Name</td><td>String</td></tr><tr><td>email</td><td>Organization email</td><td>String</td></tr><tr><td>createdAt</td><td>Time of account creation</td><td>String</td></tr><tr><td>allowedAddress</td><td>Object</td><td>Object containing allowed address for chains - ethereum, bitcoin, sui, polygon, solana</td></tr></tbody></table>

## Generate API key&#x20;

<mark style="color:green;">`POST`</mark> `/api/public/generate-api-key`

Send a request to generate a new API key. Your current API key will be revoked.

#### Headers

| Name                                        | Type   | Description                          |
| ------------------------------------------- | ------ | ------------------------------------ |
| x-api-key<mark style="color:red;">\*</mark> | String | API Key associated with organization |

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

```javascript
{
    "success": true,
    "apiKey": "newapikey",
    "message": "New API key generated successfully. Previous API key has been revoked."
}
```

{% endtab %}
{% endtabs %}

#### Sample Request

```bash
curl --location --request POST '{{url}}/api/public/generate-api-key' \
--header 'Content-Type: application/json' \
--header 'x-api-key: sampleapikey'
```

#### Response Object

<table><thead><tr><th width="166.33333333333331">Property</th><th width="480">Description</th><th>Type</th></tr></thead><tbody><tr><td>success</td><td>API response status</td><td>Boolean</td></tr><tr><td>message</td><td>Request response message</td><td>String</td></tr><tr><td>apiKey</td><td>New API key </td><td>String</td></tr></tbody></table>

###
