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

# Manage Whitelist

> POST /v2/naas/whitelist — create a wallet group or add an address to an existing group.

This endpoint has two modes depending on the payload fields provided.

## Create a wallet group

Provide only `walletName` to create a new Fireblocks external wallet group.

**Payload:**

| Field        | Required | Description                   |
| ------------ | -------- | ----------------------------- |
| `walletName` | Yes      | Name for the new wallet group |

**Response `200`:**

```json theme={null}
{ "walletId": "fb-wallet-abc123", "message": "External wallet created" }
```

Use the returned `walletId` when adding addresses to this group.

***

## Add an address to a group

Provide `walletId` plus address details to register a new address under an existing group.

**Payload:**

| Field          | Required | Description                                           |
| -------------- | -------- | ----------------------------------------------------- |
| `walletName`   | Yes      | Name of the existing group                            |
| `walletId`     | Yes      | Fireblocks wallet group ID (from the create response) |
| `address`      | Yes      | Destination crypto address                            |
| `addressName`  | Yes      | Human-readable label for this address                 |
| `currencyCode` | Yes      | Asset code (e.g. `USDT_ETH`, `BTC`)                   |

**Response `200`:**

```json theme={null}
{ "message": "Whitelist request successful" }
```

<RequestExample>
  ```bash cURL (create group) theme={null}
  curl -X POST https://checkout.noxpay.io/v2/naas/whitelist \
    -H "api-key: <key>" \
    -H "X-Signature: <signed-body-signature>" \
    -H "Content-Type: application/json" \
    -d '{
      "timestamp": "2026-05-19T14:30:00Z",
      "correlation_id": "a1b2c3d4-e5f6-4789-abcd-000000000001",
      "payload": { "walletName": "Treasury" }
    }'
  ```

  ```python Python (add address) theme={null}
  import requests

  body, sig = sign_envelope({
      "walletName":   "Treasury",
      "walletId":     "fb-wallet-abc123",
      "address":      "0xABC123...",
      "addressName":  "Hot wallet",
      "currencyCode": "USDT_ETH",
  }, "a1b2c3d4-e5f6-4789-abcd-000000000001")
  response = requests.post(
      "https://checkout.noxpay.io/v2/naas/whitelist",
      headers={"api-key": "<key>", "X-Signature": sig, "Content-Type": "application/json"},
      data=body,
  )
  print(response.json())
  ```

  ```javascript Node.js (add address) theme={null}
  const { body, signature } = signEnvelope({
    walletName:   "Treasury",
    walletId:     "fb-wallet-abc123",
    address:      "0xABC123...",
    addressName:  "Hot wallet",
    currencyCode: "USDT_ETH",
  }, "a1b2c3d4-e5f6-4789-abcd-000000000001");
  const response = await fetch("https://checkout.noxpay.io/v2/naas/whitelist", {
    method: "POST",
    headers: { "api-key": "<key>", "X-Signature": signature, "Content-Type": "application/json" },
    body,
  });
  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 (create group) theme={null}
  { "walletId": "fb-wallet-abc123", "message": "External wallet created" }
  ```

  ```json 200 (add address) theme={null}
  { "message": "Whitelist request successful" }
  ```
</ResponseExample>
