> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ekiden.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Root Whitelist

Root whitelist endpoints manage the set of root accounts that are permitted to authorize and onboard when whitelist enforcement is enabled.

## Check Whitelist Status

Check whether a root account is currently whitelisted.

By root address:

```http theme={null}
GET /api/v1/authorize/whitelist/check?root_address=0x...
```

Or by public key:

```http theme={null}
GET /api/v1/authorize/whitelist/check?root_public_key=0x...
```

Provide exactly one of `root_address` or `root_public_key`.

Example response:

```json theme={null}
{
  "root_address": "0x...",
  "whitelisted": true
}
```

The `whitelisted` field indicates whether the specified root account is currently allowed to authorize.

When whitelist enforcement is disabled, all root accounts are treated as whitelisted.

***

## Manage Whitelist Entries

Whitelist entries can be managed using the following administrative endpoints.

These endpoints are protected using **HTTP Basic Authentication** and are intended for administrative use only.

```http theme={null}
PUT /api/v1/authorize/whitelist/{root_address}
```

Adds or updates a whitelist entry.

```http theme={null}
DELETE /api/v1/authorize/whitelist/{root_address}
```

Removes a whitelist entry.

These endpoints should never be exposed in client applications or SDKs.

***

## Root Account Lookup

Authenticated users can retrieve the root account associated with their account.

```http theme={null}
GET /api/v1/user/root-account
Authorization: Bearer <jwt>
```

Example response:

```json theme={null}
{
  "root_address": "0x..."
}
```

This endpoint is useful when a frontend or SDK needs to display the authenticated user's root account.
