---
title: "Update a webhook"
method: PATCH
path: "/v0/token/hooks/{chain}"
tags: ["Token"]
---

# Update a webhook

`PATCH /v0/token/hooks/{chain}`

## Request

- Base URL: `https://api.blockaid.io`
- URL: `https://api.blockaid.io/v0/token/hooks/{chain}`
- Auth: one of:
  - API key in header `X-API-Key`
  - API key in header `X-CLIENT-ID`
- TypeScript: <https://skmtc.dev/blockaid-official/apis/blockaid-api/docs/v0/token/hooks/:chain/patch.ts> (a function with typed inputs; its response is checked against the schema)

Updates an existing webhook subscription in place. Only the provided fields are changed; omitted fields keep their current value. `filter` replaces the hook's entire filter (token-address or token-type) in one call. For a token-address filter specifically, `add_token_addresses`/`remove_token_addresses` let you adjust the address list incrementally without resending it; they are mutually exclusive with `filter` and only valid when the existing (or resulting) filter is a token-address filter.

## Path parameters

- `chain` 'arbitrum' | 'avalanche' | 'base' | 'bsc' | 'ethereum' | 'optimism' | 'polygon' | 'zora' | 'solana' | 'starknet' | 'starknet-sepolia' | 'stellar' | 'linea' | 'degen' | 'zksync' | 'scroll' | 'blast' | 'soneium-minato' | 'base-sepolia' | 'bitcoin' | 'abstract' | 'soneium' | 'ink' | 'berachain' | 'unichain' | 'ronin' | 'sui' | 'hedera' | 'hyperevm' | 'xlayer' | 'monad' | 'megaeth' | 'tempo' | 'sei' | 'kaia' | 'tron' | 'robinhood' | 'flare' | 'arc', required: The chain name

## Request body

- HookUpdateRequest
  - `url` string, uri, nullable: If provided, replaces the hook's url
  - `shared_secret_key` string, nullable: If provided, replaces the hook's shared secret key
  - `filter` union: If provided, replaces the hook's filter in full. Mutually exclusive with add_token_addresses/remove_token_addresses.
    - TokenAddressFilter
      - `filter_type` 'token_address': Type of filter applied to the webhook updates
      - `token_addresses` string[], required: List of up to 100000 token addresses to filter webhook updates
    - TokenTypeFilter
      - `filter_type` 'token_type': Type of filter applied to the webhook updates
      - `token_type` 'Fungible' | 'NonFungible', required: Type of token to filter
  - `add_token_addresses` string[], nullable: Token addresses to add to the hook's existing token_address filter, without having to resend the full list. Mutually exclusive with filter.
  - `remove_token_addresses` string[], nullable: Token addresses to remove from the hook's existing token_address filter. Mutually exclusive with filter.

## Response `200`

Successful Response

- Hook
  - `url` string, uri, required
  - `shared_secret_key` string, nullable: Optional shared secret key (32 characters), used to calculate the HMAC signature
  - `filter` union: The webhook's currently registered filter.
    - TokenAddressFilter
      - `filter_type` 'token_address': Type of filter applied to the webhook updates
      - `token_addresses` string[], required: List of up to 100000 token addresses to filter webhook updates
    - TokenTypeFilter
      - `filter_type` 'token_type': Type of filter applied to the webhook updates
      - `token_type` 'Fungible' | 'NonFungible', required: Type of token to filter
  - `chain` 'arbitrum' | 'avalanche' | 'base' | 'bsc' | 'ethereum' | 'optimism' | 'polygon' | 'zora' | 'solana' | 'starknet' | 'starknet-sepolia' | 'stellar' | 'linea' | 'degen' | 'zksync' | 'scroll' | 'blast' | 'soneium-minato' | 'base-sepolia' | 'bitcoin' | 'abstract' | 'soneium' | 'ink' | 'berachain' | 'unichain' | 'ronin' | 'sui' | 'hedera' | 'hyperevm' | 'xlayer' | 'monad' | 'megaeth' | 'tempo' | 'sei' | 'kaia' | 'tron' | 'robinhood' | 'flare' | 'arc', required: The chain name
  - `active` boolean, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: Host not reachable
- `404`: Hook not found
- `422`: Validation Error

## Changes

> 120 revisions in range; 1 not diffed.

- **2026-10-29** `6354a6eb6857`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/blockaid-official/apis/blockaid-api/changes/v0/token/hooks/:chain/patch.md)

---

[API](https://skmtc.dev/blockaid-official/apis/blockaid-api.md) - [All operations](https://skmtc.dev/blockaid-official/apis/blockaid-api/llms.txt) - [OpenAPI document](https://skmtc.dev/blockaid-official/apis/blockaid-api/revisions/104550c9d3f1?raw)
