Links

Edit Webhook

Programatically edit a Helius webhook.
Note: It may take up to 2 minutes for webhook changes to take effect!

PUT /webhooks/:webhookID

put
https://api.helius.xyz
/v0/webhooks/{webhookID}
Edits a webhook.
Parameters
Path
webhookID*
string
The webhook ID.
Query
api-key*
string
The api key.
Body
Example
Schema
{
"webhookURL": "string",
"transactionTypes": [
"UNKNOWN"
],
"accountAddresses": [
"string"
],
"webhookType": "string",
"authHeader": "string"
}
Responses
200: OK
The edited webhook.
400: Bad Request
Invalid request.
401: Unauthorized
Unauthorized request.
403: Forbidden
Request was forbidden.
404: Not Found
The specified resource was not found.
429: Too Many Requests
Exceeded rate limit.
500: Internal Server Error
The server encountered an unexpected condition that prevented it from fulfilling the request.

Edit Webhook Example

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();