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

# Add Addresses to Whitelist

> Add one or more pre-approved external wallet addresses for secure withdrawals

Add one or more external wallet addresses to the whitelist. Multiple addresses can be added in a single request.

### Authentication

<ParamField header="x-client-key" type="string" required>
  Your public API client key
</ParamField>

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication
</ParamField>

### Request Body

<ParamField body="wallets" type="array" required>
  Array of addresses to whitelist

  <Expandable title="Whitelist Entry Object">
    <ParamField body="currency" type="string" required>
      Currency code (e.g., "xrp", "usdc")
    </ParamField>

    <ParamField body="name" type="string" required>
      Friendly name or label for the address
    </ParamField>

    <ParamField body="beneficiaryFirstName" type="string" required>
      Beneficiary's first name
    </ParamField>

    <ParamField body="beneficiaryLastName" type="string" required>
      Beneficiary's last name
    </ParamField>

    <ParamField body="walletAddress" type="string" required>
      Blockchain address
    </ParamField>

    <ParamField body="walletMemo" type="string">
      Memo/destination tag (required for XRP, Stellar, etc.)
    </ParamField>
  </Expandable>
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  Whether whitelisting was successful
</ResponseField>

<ResponseExample>
  ```json 201 - Created theme={null} theme={null}
  {
    "success": true
  }
  ```

  ```json 422 - Validation Error theme={null} theme={null}
  {
    "message": "Invalid wallet address format"
  }
  ```
</ResponseExample>

<CodeGroup>
  ```bash cURL theme={null} theme={null}
  curl -X POST "https://dev.api.baanx.com/v1/wallet/whitelist" \
    -H "x-client-key: YOUR_CLIENT_KEY" \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "wallets": [
        {
          "currency": "xrp",
          "name": "Binance Account | Primary",
          "beneficiaryFirstName": "John",
          "beneficiaryLastName": "Doe",
          "walletAddress": "rNxp4h8apvRis6mJf9Sh8C6iRxfrDWN7AA",
          "walletMemo": "66"
        }
      ]
    }'
  ```

  ```python Python theme={null} theme={null}
  import requests

  url = "https://dev.api.baanx.com/v1/wallet/whitelist"
  headers = {
      "x-client-key": "YOUR_CLIENT_KEY",
      "Authorization": "Bearer YOUR_ACCESS_TOKEN",
      "Content-Type": "application/json"
  }

  data = {
      "wallets": [
          {
              "currency": "xrp",
              "name": "Binance Account | Primary",
              "beneficiaryFirstName": "John",
              "beneficiaryLastName": "Doe",
              "walletAddress": "rNxp4h8apvRis6mJf9Sh8C6iRxfrDWN7AA",
              "walletMemo": "66"
          },
          {
              "currency": "xrp",
              "name": "Kraken Exchange",
              "beneficiaryFirstName": "John",
              "beneficiaryLastName": "Doe",
              "walletAddress": "rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY",
              "walletMemo": "12345"
          }
      ]
  }

  response = requests.post(url, headers=headers, json=data)

  if response.status_code == 201:
      print("Addresses added to whitelist successfully!")
  ```

  ```typescript TypeScript theme={null} theme={null}
  interface AddWhitelistRequest {
    currency: string;
    name: string;
    beneficiaryFirstName: string;
    beneficiaryLastName: string;
    walletAddress: string;
    walletMemo?: string;
  }

  async function addToWhitelist(
    addresses: AddWhitelistRequest[]
  ): Promise<boolean> {
    const response = await fetch(
      'https://dev.api.baanx.com/v1/wallet/whitelist',
      {
        method: 'POST',
        headers: {
          'x-client-key': 'YOUR_CLIENT_KEY',
          'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
          'Content-Type': 'application/json'
        },
        body: JSON.stringify({ wallets: addresses })
      }
    );

    const result = await response.json();
    return result.success;
  }

  await addToWhitelist([
    {
      currency: 'xrp',
      name: 'Binance Account',
      beneficiaryFirstName: 'John',
      beneficiaryLastName: 'Doe',
      walletAddress: 'rNxp4h8apvRis6mJf9Sh8C6iRxfrDWN7AA',
      walletMemo: '66'
    }
  ]);
  ```
</CodeGroup>

## Related Endpoints

* [Get Whitelisted Addresses](/api-reference/wallet/whitelist-get) - View current whitelist
* [Remove Addresses from Whitelist](/api-reference/wallet/whitelist-delete) - Remove whitelisted addresses
