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.uniblock.dev/uni/v1/webhook/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));