PATCH /webhooks/rest/v1/webhooks/{id} REST API Endpoint
The
filter_function parameter can only be updated for existing webhooks that were created with custom filters. New webhooks created from templates cannot use custom filters. For advanced filtering capabilities, consider using Streams.Path Parameters
id
string
REQUIRED
Loading...
Body Parameters
name
string
Loading...
filter_function
string
Loading...
notification_email
string
Loading...
destination_attributes
object
Loading...
url
string
Loading...
security_token
string
Loading...
compression
string
Loading...
nonegzipReturns
id
string
Loading...
created_at
string
Loading...
name
string
Loading...
network
string
Loading...
notification_email
string
Loading...
destination_attributes
object
Loading...
url
string
Loading...
security_token
string
Loading...
compression
string
Loading...
sequence
integer
Loading...
status
string
Loading...
templateId
string
Loading...
templateArgs
object
Loading...
Request
1curl -X PATCH \2"https://api.quicknode.com/webhooks/rest/v1/webhooks/YOUR_WEBHOOK_ID" \3-H "accept: application/json" \4-H "Content-Type: application/json" \5-H "x-api-key: YOUR_API_KEY" \6-d $'{7"name": "Updated Webhook Name",8"filter_function": "dHJ5IHsKICAgIHZhciBkYXRhID0gSlNPTi5wYXJzZShzdHJlYW1EYXRhKTsKICAgIC8vIENvbnZlcnQgaGV4IG51bWJlciB0byBkZWNpbWFsCiAgICB2YXIgbnVtYmVyRGVjaW1hbCA9IHBhcnNlSW50KGRhdGEubnVtYmVyLCAxNik7CiAgICB2YXIgZmlsdGVyZWREYXRhID0ge2hhc2g6IGRhdGEuaGFzaCwgbnVtYmVyOiBudW1iZXJEZWNpbWFsfTsKICAgIEpTT04uc3RyaW5naWZ5KGZpbHRlcmVkRGF0YSk7Cn0gY2F0Y2ggKGUpIHsKICAgIEpTT04uc3RyaW5naWZ5KHtlcnJvcjogZS5tZXNzYWdlfSk7Cn0K",9"notification_email": "updated@example.com",10"destination_attributes": {11"url": "https://webhook.site/your-updated-url",12"security_token": "updated-security-token",13"compression": "gzip"14},15"status": "active"16}'
1curl -X PATCH \2"https://api.quicknode.com/webhooks/rest/v1/webhooks/YOUR_WEBHOOK_ID" \3-H "accept: application/json" \4-H "Content-Type: application/json" \5-H "x-api-key: YOUR_API_KEY" \6-d $'{7"name": "Updated Webhook Name",8"filter_function": "dHJ5IHsKICAgIHZhciBkYXRhID0gSlNPTi5wYXJzZShzdHJlYW1EYXRhKTsKICAgIC8vIENvbnZlcnQgaGV4IG51bWJlciB0byBkZWNpbWFsCiAgICB2YXIgbnVtYmVyRGVjaW1hbCA9IHBhcnNlSW50KGRhdGEubnVtYmVyLCAxNik7CiAgICB2YXIgZmlsdGVyZWREYXRhID0ge2hhc2g6IGRhdGEuaGFzaCwgbnVtYmVyOiBudW1iZXJEZWNpbWFsfTsKICAgIEpTT04uc3RyaW5naWZ5KGZpbHRlcmVkRGF0YSk7Cn0gY2F0Y2ggKGUpIHsKICAgIEpTT04uc3RyaW5naWZ5KHtlcnJvcjogZS5tZXNzYWdlfSk7Cn0K",9"notification_email": "updated@example.com",10"destination_attributes": {11"url": "https://webhook.site/your-updated-url",12"security_token": "updated-security-token",13"compression": "gzip"14},15"status": "active"16}'
1const axios = require('axios')23const webhookId = 'YOUR_WEBHOOK_ID' // Replace with your actual webhook ID4const url = `https://api.quicknode.com/webhooks/rest/v1/webhooks/${webhookId}`56const payload = {7name: 'Updated Webhook Name',8filter_function:9'dHJ5IHsKICAgIHZhciBkYXRhID0gSlNPTi5wYXJzZShzdHJlYW1EYXRhKTsKICAgIC8vIENvbnZlcnQgaGV4IG51bWJlciB0byBkZWNpbWFsCiAgICB2YXIgbnVtYmVyRGVjaW1hbCA9IHBhcnNlSW50KGRhdGEubnVtYmVyLCAxNik7CiAgICB2YXIgZmlsdGVyZWREYXRhID0ge2hhc2g6IGRhdGEuaGFzaCwgbnVtYmVyOiBudW1iZXJEZWNpbWFsfTsKICAgIEpTT04uc3RyaW5naWZ5KGZpbHRlcmVkRGF0YSk7Cn0gY2F0Y2ggKGUpIHsKICAgIEpTT04uc3RyaW5naWZ5KHtlcnJvcjogZS5tZXNzYWdlfSk7Cn0K',10notification_email: 'updated@example.com',11destination_attributes: {12url: 'https://webhook.site/your-updated-url',13security_token: 'updated-security-token',14compression: 'gzip',15},16status: 'active',17}1819const headers = {20accept: 'application/json',21'Content-Type': 'application/json',22'x-api-key': 'YOUR_API_KEY', // Replace with your actual API key23}2425axios26.patch(url, payload, { headers })27.then(response => {28console.log(response.data)29})30.catch(error => {31console.error('Error:', error.response?.data || error.message)32})33
1const axios = require('axios')23const webhookId = 'YOUR_WEBHOOK_ID' // Replace with your actual webhook ID4const url = `https://api.quicknode.com/webhooks/rest/v1/webhooks/${webhookId}`56const payload = {7name: 'Updated Webhook Name',8filter_function:9'dHJ5IHsKICAgIHZhciBkYXRhID0gSlNPTi5wYXJzZShzdHJlYW1EYXRhKTsKICAgIC8vIENvbnZlcnQgaGV4IG51bWJlciB0byBkZWNpbWFsCiAgICB2YXIgbnVtYmVyRGVjaW1hbCA9IHBhcnNlSW50KGRhdGEubnVtYmVyLCAxNik7CiAgICB2YXIgZmlsdGVyZWREYXRhID0ge2hhc2g6IGRhdGEuaGFzaCwgbnVtYmVyOiBudW1iZXJEZWNpbWFsfTsKICAgIEpTT04uc3RyaW5naWZ5KGZpbHRlcmVkRGF0YSk7Cn0gY2F0Y2ggKGUpIHsKICAgIEpTT04uc3RyaW5naWZ5KHtlcnJvcjogZS5tZXNzYWdlfSk7Cn0K',10notification_email: 'updated@example.com',11destination_attributes: {12url: 'https://webhook.site/your-updated-url',13security_token: 'updated-security-token',14compression: 'gzip',15},16status: 'active',17}1819const headers = {20accept: 'application/json',21'Content-Type': 'application/json',22'x-api-key': 'YOUR_API_KEY', // Replace with your actual API key23}2425axios26.patch(url, payload, { headers })27.then(response => {28console.log(response.data)29})30.catch(error => {31console.error('Error:', error.response?.data || error.message)32})33
1import requests23webhook_id = "YOUR_WEBHOOK_ID" # Replace with your actual webhook ID4url = f"https://api.quicknode.com/webhooks/rest/v1/webhooks/{webhook_id}"56payload = {7"name": "Updated Webhook Name",8"filter_function": "dHJ5IHsKICAgIHZhciBkYXRhID0gSlNPTi5wYXJzZShzdHJlYW1EYXRhKTsKICAgIC8vIENvbnZlcnQgaGV4IG51bWJlciB0byBkZWNpbWFsCiAgICB2YXIgbnVtYmVyRGVjaW1hbCA9IHBhcnNlSW50KGRhdGEubnVtYmVyLCAxNik7CiAgICB2YXIgZmlsdGVyZWREYXRhID0ge2hhc2g6IGRhdGEuaGFzaCwgbnVtYmVyOiBudW1iZXJEZWNpbWFsfTsKICAgIEpTT04uc3RyaW5naWZ5KGZpbHRlcmVkRGF0YSk7Cn0gY2F0Y2ggKGUpIHsKICAgIEpTT04uc3RyaW5naWZ5KHtlcnJvcjogZS5tZXNzYWdlfSk7Cn0K",9"notification_email": "updated@example.com",10"destination_attributes": {11"url": "https://webhook.site/your-updated-url",12"security_token": "updated-security-token",13"compression": "gzip"14},15"status": "active"16}1718headers = {19"accept": "application/json",20"Content-Type": "application/json",21"x-api-key": "YOUR_API_KEY" # Replace with your actual API key22}2324response = requests.patch(url, headers=headers, json=payload)2526print(response.text)
1import requests23webhook_id = "YOUR_WEBHOOK_ID" # Replace with your actual webhook ID4url = f"https://api.quicknode.com/webhooks/rest/v1/webhooks/{webhook_id}"56payload = {7"name": "Updated Webhook Name",8"filter_function": "dHJ5IHsKICAgIHZhciBkYXRhID0gSlNPTi5wYXJzZShzdHJlYW1EYXRhKTsKICAgIC8vIENvbnZlcnQgaGV4IG51bWJlciB0byBkZWNpbWFsCiAgICB2YXIgbnVtYmVyRGVjaW1hbCA9IHBhcnNlSW50KGRhdGEubnVtYmVyLCAxNik7CiAgICB2YXIgZmlsdGVyZWREYXRhID0ge2hhc2g6IGRhdGEuaGFzaCwgbnVtYmVyOiBudW1iZXJEZWNpbWFsfTsKICAgIEpTT04uc3RyaW5naWZ5KGZpbHRlcmVkRGF0YSk7Cn0gY2F0Y2ggKGUpIHsKICAgIEpTT04uc3RyaW5naWZ5KHtlcnJvcjogZS5tZXNzYWdlfSk7Cn0K",9"notification_email": "updated@example.com",10"destination_attributes": {11"url": "https://webhook.site/your-updated-url",12"security_token": "updated-security-token",13"compression": "gzip"14},15"status": "active"16}1718headers = {19"accept": "application/json",20"Content-Type": "application/json",21"x-api-key": "YOUR_API_KEY" # Replace with your actual API key22}2324response = requests.patch(url, headers=headers, json=payload)2526print(response.text)
1require "uri"2require "net/http"3require "json"45webhook_id = "YOUR_WEBHOOK_ID" # Replace with your actual webhook ID6url = URI("https://api.quicknode.com/webhooks/rest/v1/webhooks/#{webhook_id}")78https = Net::HTTP.new(url.host, url.port)9https.use_ssl = true1011request = Net::HTTP::Patch.new(url)12request["accept"] = "application/json"13request["Content-Type"] = "application/json"14request["x-api-key"] = "YOUR_API_KEY" # Replace with your actual API key1516request.body = {17"name" => "Updated Webhook Name",18"filter_function" => "dHJ5IHsKICAgIHZhciBkYXRhID0gSlNPTi5wYXJzZShzdHJlYW1EYXRhKTsKICAgIC8vIENvbnZlcnQgaGV4IG51bWJlciB0byBkZWNpbWFsCiAgICB2YXIgbnVtYmVyRGVjaW1hbCA9IHBhcnNlSW50KGRhdGEubnVtYmVyLCAxNik7CiAgICB2YXIgZmlsdGVyZWREYXRhID0ge2hhc2g6IGRhdGEuaGFzaCwgbnVtYmVyOiBudW1iZXJEZWNpbWFsfTsKICAgIEpTT04uc3RyaW5naWZ5KGZpbHRlcmVkRGF0YSk7Cn0gY2F0Y2ggKGUpIHsKICAgIEpTT04uc3RyaW5naWZ5KHtlcnJvcjogZS5tZXNzYWdlfSk7Cn0K",19"notification_email" => "updated@example.com",20"destination_attributes" => {21"url" => "https://webhook.site/your-updated-url",22"security_token" => "updated-security-token",23"compression" => "gzip"24},25"status" => "active"26}.to_json2728response = https.request(request)29puts response.body
1require "uri"2require "net/http"3require "json"45webhook_id = "YOUR_WEBHOOK_ID" # Replace with your actual webhook ID6url = URI("https://api.quicknode.com/webhooks/rest/v1/webhooks/#{webhook_id}")78https = Net::HTTP.new(url.host, url.port)9https.use_ssl = true1011request = Net::HTTP::Patch.new(url)12request["accept"] = "application/json"13request["Content-Type"] = "application/json"14request["x-api-key"] = "YOUR_API_KEY" # Replace with your actual API key1516request.body = {17"name" => "Updated Webhook Name",18"filter_function" => "dHJ5IHsKICAgIHZhciBkYXRhID0gSlNPTi5wYXJzZShzdHJlYW1EYXRhKTsKICAgIC8vIENvbnZlcnQgaGV4IG51bWJlciB0byBkZWNpbWFsCiAgICB2YXIgbnVtYmVyRGVjaW1hbCA9IHBhcnNlSW50KGRhdGEubnVtYmVyLCAxNik7CiAgICB2YXIgZmlsdGVyZWREYXRhID0ge2hhc2g6IGRhdGEuaGFzaCwgbnVtYmVyOiBudW1iZXJEZWNpbWFsfTsKICAgIEpTT04uc3RyaW5naWZ5KGZpbHRlcmVkRGF0YSk7Cn0gY2F0Y2ggKGUpIHsKICAgIEpTT04uc3RyaW5naWZ5KHtlcnJvcjogZS5tZXNzYWdlfSk7Cn0K",19"notification_email" => "updated@example.com",20"destination_attributes" => {21"url" => "https://webhook.site/your-updated-url",22"security_token" => "updated-security-token",23"compression" => "gzip"24},25"status" => "active"26}.to_json2728response = https.request(request)29puts response.body
1qn webhook update {webhook_id} --url https://example.com/hook2 \2--notification-email alice@example.com \3-o json
1qn webhook update {webhook_id} --url https://example.com/hook2 \2--notification-email alice@example.com \3-o json
1import { QuicknodeSdk } from "@quicknode/sdk"23const qn = new QuicknodeSdk({ apiKey: "YOUR_API_KEY" })45const response = await qn.webhooks.updateWebhook("WEBHOOK_ID", { name: "Updated webhook" })6console.log(response)7
1import { QuicknodeSdk } from "@quicknode/sdk"23const qn = new QuicknodeSdk({ apiKey: "YOUR_API_KEY" })45const response = await qn.webhooks.updateWebhook("WEBHOOK_ID", { name: "Updated webhook" })6console.log(response)7
1import asyncio2from quicknode_sdk import QuicknodeSdk, SdkFullConfig345async def main():6qn = QuicknodeSdk(SdkFullConfig(api_key="YOUR_API_KEY"))7response = await qn.webhooks.update_webhook("WEBHOOK_ID", name="Updated webhook")8print(response)91011asyncio.run(main())12
1import asyncio2from quicknode_sdk import QuicknodeSdk, SdkFullConfig345async def main():6qn = QuicknodeSdk(SdkFullConfig(api_key="YOUR_API_KEY"))7response = await qn.webhooks.update_webhook("WEBHOOK_ID", name="Updated webhook")8print(response)91011asyncio.run(main())12
1require "quicknode_sdk"23qn = QuicknodeSdk::SDK.from_config(api_key: "YOUR_API_KEY")45response = qn.webhooks.update_webhook("WEBHOOK_ID", name: "Updated webhook")6puts response7
1require "quicknode_sdk"23qn = QuicknodeSdk::SDK.from_config(api_key: "YOUR_API_KEY")45response = qn.webhooks.update_webhook("WEBHOOK_ID", name: "Updated webhook")6puts response7
1use quicknode_sdk::{QuicknodeSdk, SdkFullConfig};23#[tokio::main]4async fn main() -> Result<(), Box<dyn std::error::Error>> {5let qn = QuicknodeSdk::new(&SdkFullConfig::builder().api_key("YOUR_API_KEY").build())?;6let response = qn.webhooks.update_webhook("WEBHOOK_ID", &quicknode_sdk::webhooks::UpdateWebhookParams { name: Some("Updated webhook".to_string()), ..Default::default() }).await?;78println!("{:?}", response);9Ok(())10}11
1use quicknode_sdk::{QuicknodeSdk, SdkFullConfig};23#[tokio::main]4async fn main() -> Result<(), Box<dyn std::error::Error>> {5let qn = QuicknodeSdk::new(&SdkFullConfig::builder().api_key("YOUR_API_KEY").build())?;6let response = qn.webhooks.update_webhook("WEBHOOK_ID", &quicknode_sdk::webhooks::UpdateWebhookParams { name: Some("Updated webhook".to_string()), ..Default::default() }).await?;78println!("{:?}", response);9Ok(())10}11
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free