# Allowlisting API

## Ethereum

### Platform Account Operations

{% openapi src="<https://api.alluvial.finance/docs/doc.json>" path="/v0/platform/accounts" method="post" %}
<https://api.alluvial.finance/docs/doc.json>
{% endopenapi %}

{% openapi src="<https://api.alluvial.finance/docs/doc.json>" path="/v0/platform/accounts" method="get" %}
<https://api.alluvial.finance/docs/doc.json>
{% endopenapi %}

{% openapi src="<https://api.alluvial.finance/docs/doc.json>" path="/v0/platform/accounts/{idOrKey}" method="get" %}
<https://api.alluvial.finance/docs/doc.json>
{% endopenapi %}

{% openapi src="<https://api.alluvial.finance/docs/doc.json>" path="/v0/platform/accounts/{idOrKey}/remove" method="patch" %}
<https://api.alluvial.finance/docs/doc.json>
{% endopenapi %}

{% openapi src="<https://api.alluvial.finance/docs/doc.json>" path="/v0/platform/accounts/{idOrKey}/pause" method="patch" %}
<https://api.alluvial.finance/docs/doc.json>
{% endopenapi %}

{% openapi src="<https://api.alluvial.finance/docs/doc.json>" path="/v0/platform/accounts/{idOrKey}/reactivate" method="patch" %}
<https://api.alluvial.finance/docs/doc.json>
{% endopenapi %}

### Platform Wallet Operations

{% openapi src="<https://api.alluvial.finance/docs/doc.json>" path="/v0/platform/wallets/{idOrAddress}" method="get" %}
<https://api.alluvial.finance/docs/doc.json>
{% endopenapi %}

{% openapi src="<https://api.alluvial.finance/docs/doc.json>" path="/v0/platform/wallets" method="get" %}
<https://api.alluvial.finance/docs/doc.json>
{% endopenapi %}

### Platform Account Wallet Operations

{% openapi src="<https://api.alluvial.finance/docs/doc.json>" path="/v0/platform/accounts/{idOrKey}/wallets" method="post" %}
<https://api.alluvial.finance/docs/doc.json>
{% endopenapi %}

{% openapi src="<https://api.alluvial.finance/docs/doc.json>" path="/v0/platform/accounts/{idOrKey}/wallets" method="get" %}
<https://api.alluvial.finance/docs/doc.json>
{% endopenapi %}

{% openapi src="<https://api.alluvial.finance/docs/doc.json>" path="/v0/platform/accounts/{idOrKey}/wallets/{idOrAddress}/remove" method="patch" %}
<https://api.alluvial.finance/docs/doc.json>
{% endopenapi %}

{% openapi src="<https://api.alluvial.finance/docs/doc.json>" path="/v0/platform/accounts/{idOrKey}/wallets/{idOrAddress}/pause" method="patch" %}
<https://api.alluvial.finance/docs/doc.json>
{% endopenapi %}

{% openapi src="<https://api.alluvial.finance/docs/doc.json>" path="/v0/platform/accounts/{idOrKey}/wallets/{idOrAddress}/reactivate" method="patch" %}
<https://api.alluvial.finance/docs/doc.json>
{% endopenapi %}

## Solana

### Check Allowlist Status

Checks whether a Solana wallet address is allowlisted for staking and redemption operations.

**Endpoint:** `GET https://api.alluvial.finance/sol/v0/allowlist/{address}`

**Path Parameters:**

| Parameter | Type   | Description                    |
| --------- | ------ | ------------------------------ |
| `address` | string | Solana wallet address to check |

**Response:**

```json
{
  "address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
  "allowlisted": true,
  "permissions": {
    "staking": true,
    "redemption": true
  }
}
```

**Response Fields:**

| Field                    | Type    | Description                                       |
| ------------------------ | ------- | ------------------------------------------------- |
| `address`                | string  | The Solana wallet address that was checked        |
| `allowlisted`            | boolean | Whether the wallet is on the allowlist            |
| `permissions.staking`    | boolean | Whether the wallet has permission to stake SOL    |
| `permissions.redemption` | boolean | Whether the wallet has permission to redeem lsSOL |

### Add Wallet to Allowlist

Adds a Solana wallet address to the allowlist, granting permissions for staking and/or redemption operations.

**Endpoint:** `POST https://api.alluvial.finance/sol/v0/allowlist`

**Request Body:**

```json
{
  "address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
  "permissions": {
    "staking": true,
    "redemption": true
  }
}
```

**Request Fields:**

| Field                    | Type    | Required | Description                                   |
| ------------------------ | ------- | -------- | --------------------------------------------- |
| `address`                | string  | Yes      | Solana wallet address to add to the allowlist |
| `permissions.staking`    | boolean | Yes      | Grant permission to stake SOL                 |
| `permissions.redemption` | boolean | Yes      | Grant permission to redeem lsSOL              |

**Response:**

```json
{
  "address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
  "allowlisted": true,
  "permissions": {
    "staking": true,
    "redemption": true
  },
  "created_at": "2025-01-15T10:30:00Z"
}
```

**Response Fields:**

| Field                    | Type    | Description                                          |
| ------------------------ | ------- | ---------------------------------------------------- |
| `address`                | string  | The Solana wallet address that was added             |
| `allowlisted`            | boolean | Confirmation that the wallet is now on the allowlist |
| `permissions.staking`    | boolean | Whether the wallet has permission to stake SOL       |
| `permissions.redemption` | boolean | Whether the wallet has permission to redeem lsSOL    |
| `created_at`             | string  | ISO 8601 timestamp when the wallet was allowlisted   |


---

# 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.alluvial.finance/api-reference/allowlisting.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.
