# Whitelist Address

## Whitelist Address

<mark style="color:green;">`POST`</mark> `https://api.cngn.co/v1/api/whitelist`

Adds a wallet address to your whitelist. **Note:** There is a 24-hour timelock after whitelisting before another address can be added.

#### Request Body

| Name                                        | Type   | Description                                             |
| ------------------------------------------- | ------ | ------------------------------------------------------- |
| networkId<mark style="color:red;">\*</mark> | string | The ID of the blockchain network for the address.       |
| address<mark style="color:red;">\*</mark>   | string | The wallet address to whitelist. Automatically trimmed. |

{% tabs %}
{% tab title="200 Address whitelisted successfully" %}

```json
{
  "status": 200,
  "message": "Address whitelisted successfully",
  "data": [
    {
      "id": "clx1addr123",
      "networkId": "clx1network456",
      "publicKey": "0x1234567890abcdef1234567890abcdef12345678",
      "internalPublicKey": "0xdef456abc789...",
      "network": {
        "id": "clx1network456",
        "name": "Ethereum",
        "short_name": "ETH"
      },
      "created_at": "2025-06-15T10:30:00.000Z",
      "updated_at": "2025-06-15T10:30:00.000Z"
    }
  ]
}
```

{% endtab %}

{% tab title="400 Invalid request" %}

```json
{
  "status": 400,
  "message": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

#### Response Fields (Decrypted)

| Field                | Type   | Description                      |
| -------------------- | ------ | -------------------------------- |
| `id`                 | string | Unique address record identifier |
| `networkId`          | string | Network the address belongs to   |
| `publicKey`          | string | The whitelisted wallet address   |
| `internalPublicKey`  | string | Internal public key reference    |
| `network`            | object | Network details (see below)      |
| `network.id`         | string | Network identifier               |
| `network.name`       | string | Full network name                |
| `network.short_name` | string | Abbreviated network name         |
| `created_at`         | string | ISO 8601 creation timestamp      |
| `updated_at`         | string | ISO 8601 last update timestamp   |

#### Example Request

```bash
curl -X POST https://api.cngn.co/v1/api/whitelist \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "networkId": "clx1network456",
    "address": "0x1234567890abcdef1234567890abcdef12345678"
  }'
```
