> ## 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.

# Remove Addresses from Whitelist

> Remove one or more pre-approved external wallet addresses from the whitelist

Remove previously whitelisted addresses. Provide one or more whitelist entry IDs to remove.

### 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="walletIds" type="array" required>
  Array of whitelist entry IDs to remove (obtained from GET response)
</ParamField>

### Response

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

<ResponseExample>
  ```json 200 - Success theme={null} theme={null}
  {
    "success": true
  }
  ```

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

<CodeGroup>
  ```bash cURL theme={null} theme={null}
  curl -X DELETE "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 '{
      "walletIds": [
        "d7ed0d12-270c-4491-b1a4-bebf2cc42b5c"
      ]
    }'
  ```

  ```python Python theme={null} theme={null}
  remove_data = {
      "walletIds": [
          "d7ed0d12-270c-4491-b1a4-bebf2cc42b5c",
          "a3f2e1d4-c5b6-47a8-9e0f-1d2c3b4a5e6f"
      ]
  }

  response = requests.delete(
      "https://dev.api.baanx.com/v1/wallet/whitelist",
      headers=headers,
      json=remove_data
  )

  if response.status_code == 200:
      print("Addresses removed from whitelist")
  ```

  ```typescript TypeScript theme={null} theme={null}
  async function removeFromWhitelist(walletIds: string[]): Promise<boolean> {
    const response = await fetch(
      'https://dev.api.baanx.com/v1/wallet/whitelist',
      {
        method: 'DELETE',
        headers: {
          'x-client-key': 'YOUR_CLIENT_KEY',
          'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
          'Content-Type': 'application/json'
        },
        body: JSON.stringify({ walletIds })
      }
    );

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

  await removeFromWhitelist(['d7ed0d12-270c-4491-b1a4-bebf2cc42b5c']);
  ```
</CodeGroup>

## Related Endpoints

* [Get Whitelisted Addresses](/api-reference/wallet/whitelist-get) - View current whitelist
* [Add Addresses to Whitelist](/api-reference/wallet/whitelist-post) - Add new pre-approved addresses
