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

# PUT /v1/subscriptions/:id/filters/addresses

> Replace the entire address filter list for a subscription atomically. All existing addresses are removed and replaced with the provided list.

PUT atomically replaces the entire address list for a subscription. All existing addresses are removed and the new list is applied in their place. Use this when you want to set the canonical list of addresses from an authoritative source. For incremental changes — adding a few addresses or removing specific ones — use [PATCH](/api/addresses/patch) instead.

## Request

```
PUT /v1/subscriptions/:id/filters/addresses
```

### Path parameters

<ParamField path="id" type="string" required>
  The subscription ID (e.g. `sub_2QkP9aB7xN...`).
</ParamField>

### Body

A JSON array of address objects to set as the new filter list. Send an empty array `[]` to clear all addresses.

<ParamField body="[].chainId" type="string" required>
  CAIP-2 chain identifier. Supported values: `tron:mainnet`, `tron:nile`, `tron:shasta`.
</ParamField>

<ParamField body="[].address" type="string" required>
  Base58check-encoded TRON address (starts with `T`).
</ParamField>

```bash theme={null}
curl -X PUT https://api.offthehook.dev/v1/subscriptions/sub_2QkP9aB7xN.../filters/addresses \
  -H "Authorization: Bearer oth_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    { "chainId": "tron:mainnet", "address": "TLsV52sRDL79HXGGm9yzwKibb6BeruhUzy" },
    { "chainId": "tron:mainnet", "address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t" }
  ]'
```

## Response

**200 OK** — the updated subscription resource with the new address list reflected in `filters.addresses`.

<Warning>
  PUT removes **all** existing addresses before inserting the new list. If you send an empty array `[]`, every address is cleared and no further webhooks will fire for that subscription until you add addresses again.
</Warning>

## Errors

| Code                       | HTTP | Description                                                           |
| -------------------------- | ---- | --------------------------------------------------------------------- |
| `not_found`                | 404  | The subscription ID does not exist or belongs to a different API key. |
| `invalid_address`          | 400  | One or more addresses failed base58check validation.                  |
| `invalid_chain`            | 400  | One or more `chainId` values are not recognized.                      |
| `chain_not_enabled`        | 400  | The `chainId` is valid but not currently enabled on this account.     |
| `addresses_limit_exceeded` | 400  | The provided array exceeds the per-request size limit.                |
| `unauthorized`             | 401  | The `Authorization` header is missing or the key is invalid.          |
