Skip to main content
PATCH
/
webhook
/
{id}
Update Webhook Details
curl --request PATCH \
  --url https://api-test.uniblock.dev/uni/v1/webhook/{id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "name": "My Webhook",
  "description": "My Webhook description",
  "metadata": {
    "source": "Uniblock"
  },
  "contractAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
  "chainIds": [
    1
  ],
  "addChainIds": [
    1
  ],
  "removeChainIds": [
    1
  ]
}
'
const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Webhook',
description: 'My Webhook description',
metadata: {source: 'Uniblock'},
contractAddress: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
chainIds: [1],
addChainIds: [1],
removeChainIds: [1]
})
};

fetch('https://api-test.uniblock.dev/uni/v1/webhook/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
import requests

url = "https://api-test.uniblock.dev/uni/v1/webhook/{id}"

payload = {
"name": "My Webhook",
"description": "My Webhook description",
"metadata": { "source": "Uniblock" },
"contractAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainIds": [1],
"addChainIds": [1],
"removeChainIds": [1]
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)

Authorizations

X-API-KEY
string
header
required

API key to access the API (optional)

Path Parameters

id
string
required

Id of the webhook to edit.

Example:

"ba8eea63-9354-42f5-8268-03483a7f1df5"

Body

application/json
name
string
required

Name of webhook.

Example:

"My Webhook"

description
string
required

Description of webhook.

Example:

"My Webhook description"

metadata
object
required

Additional metadata to be returned alongside a webhook response.

Example:
{ "source": "Uniblock" }
contractAddress
string
required

Address of contract to watch.

Example:

"0xdAC17F958D2ee523a2206206994597C13D831ec7"

chainIds
enum<number>
required

Unique identifier for blockchain networks.

Available options:
[object Object]
Example:
[1]
addChainIds
enum<number>
required

Add unique identifiers for blockchain networks.

Available options:
[object Object]
Example:
[1]
removeChainIds
enum<number>
required

Remove unique identifiers for blockchain networks.

Available options:
[object Object]
Example:
[1]
addresses
string[]

Addresses to be watched.

Example:
[
"0x89e51fA8CA5D66cd220bAed62ED01e8951aa7c40"
]
addAddresses
string[]

Add addresses to be watched.

Example:
[
"0x89e51fA8CA5D66cd220bAed62ED01e8951aa7c40"
]
removeAddresses
string[]

Remove addresses from being watched.

Example:
[
"0x89e51fA8CA5D66cd220bAed62ED01e8951aa7c40"
]
filter
object

An object representing the desired filters.

walletAddresses
string[]

Set addresses watched by wallet event.

Example:
[
"0xfa6E0aDDF68267b8b6fF2dA55Ce01a53Fad6D8e2"
]
addWalletAddresses
string[]

Add addresses watched by wallet event.

Example:
[
"0xfa6E0aDDF68267b8b6fF2dA55Ce01a53Fad6D8e2"
]
removeWalletAddresses
string[]

Remove addresses watched by wallet event.

Example:
[
"0xfa6E0aDDF68267b8b6fF2dA55Ce01a53Fad6D8e2"
]
contractAddresses
string[]

Set contract addresses for a webhook. Input format is {chain}.{address}

Example:
[
"ethereum.0x582048c4077a34e7c3799962f1f8c5342a3f4b12",
"solana.28PLEmWxWF2oib7Wh2TKoH3XVNuWyaxLejveBHLtFkJo"
]
addContractAddresses
string[]

Addresses to add from webhook. Input format is {chain}.{address}

Example:
[
"ethereum.0x582048c4077a34e7c3799962f1f8c5342a3f4b12",
"solana.28PLEmWxWF2oib7Wh2TKoH3XVNuWyaxLejveBHLtFkJo"
]
removeContractAddresses
string[]

Addresses to remove from webhook. Input format is {chain}.{address}

Example:
[
"ethereum.0x582048c4077a34e7c3799962f1f8c5342a3f4b12",
"solana.28PLEmWxWF2oib7Wh2TKoH3XVNuWyaxLejveBHLtFkJo"
]
marketplaces
string[]

Marketplaces to monitor.

Example:
["opensea", "x2y2", "looksrare"]
addMarketplaces
string[]

Additional marketplaces to monitor.

Example:
["opensea", "x2y2", "looksrare"]
removeMarketplaces
string[]

Marketplaces to remove from monitoring.

Example:
["opensea", "x2y2", "looksrare"]
collectionIds
string[]

Collection Ids to monitor.

Example:
["510139ec0d8cf5513d59a8d3afa1c061"]
addCollectionIds
string[]

Additional collection Ids to monitor.

Example:
["510139ec0d8cf5513d59a8d3afa1c061"]
removeCollectionIds
string[]

Collection Ids to remove from monitoring.

Example:
["510139ec0d8cf5513d59a8d3afa1c061"]
nftIds
string[]

NFT Ids to monitor. Input format is {chain}.{contract}.{token_id} for EVM chains, {chain}.{token_id} for Solana

Example:
[
"ethereum.0x05b1ef501cfdeed15f73bfc4a926e528cd95d190.6120",
"solana.2iZBbRGnLVEEZH6JDsaNsTo66s2uxx7DTchVWKU8oisR"
]
addNftIds
string[]

Addtional NFT Ids to monitor. Input format is {chain}.{contract}.{token_id} for EVM chains, {chain}.{token_id} for Solana

Example:
[
"ethereum.0x05b1ef501cfdeed15f73bfc4a926e528cd95d190.6120",
"solana.2iZBbRGnLVEEZH6JDsaNsTo66s2uxx7DTchVWKU8oisR"
]
removeNftIds
string[]

NFT Ids to remove from monitoring. Input format is {chain}.{contract}.{token_id} for EVM chains, {chain}.{token_id} for Solana

Example:
[
"ethereum.0x05b1ef501cfdeed15f73bfc4a926e528cd95d190.6120",
"solana.2iZBbRGnLVEEZH6JDsaNsTo66s2uxx7DTchVWKU8oisR"
]

Response

200 - undefined