Edit Webhook
Programatically edit a Helius webhook.
Last updated
Was this helpful?
Programatically edit a Helius webhook.
Last updated
Was this helpful?
Note: It may take up to 2 minutes for webhook changes to take effect!
const editWebhook = async () => {
try {
const response = await fetch(
"https://api.helius.xyz/v0/webhooks/<webhook-id>?api-key=<api-key>",
{
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
webhookURL: "https://typedwebhook.tools/webhook/dfb45a88-c361-4c06-84d8-e728588b8907",
transactionTypes: [
"Any"
],
accountAddresses: [
"2k5AXX4guW9XwRQ1AKCpAuUqgWDpQpwFfpVFh3hnm2Ha"
],
webhookType: "enhanced"
}),
}
);
const data = await response.json();
console.log({ data });
} catch (e) {
console.error("error", e);
}
};
editWebhook();
The webhook ID.
The api key.
PUT /v0/webhooks/{webhookID} HTTP/1.1
Host: api.helius.xyz
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 139
{
"webhookURL": "text",
"transactionTypes": [
"UNKNOWN"
],
"accountAddresses": [
"text"
],
"webhookType": "text",
"txnStatus": "all",
"authHeader": "text"
}
{
"webhookID": "text",
"wallet": "text",
"webhookURL": "text",
"transactionTypes": [
"UNKNOWN"
],
"accountAddresses": [
"text"
],
"webhookType": "text",
"txnStatus": "all",
"authHeader": "text"
}