JavaScript
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche();
async function run() {
const result = await avalanche.webhooks.addresses.add({
id: "f33de69c-d13b-4691-908f-870d6e2e6b04",
addressesChangeRequest: {
addresses: [
"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
],
},
});
console.log(result);
}
run();curl --request PATCH \
--url https://glacier-api.avax.network/v1/webhooks/{id}/addresses \
--header 'Content-Type: application/json' \
--header 'x-glacier-api-key: <api-key>' \
--data '
{
"addresses": [
"<string>"
]
}
'import requests
url = "https://glacier-api.avax.network/v1/webhooks/{id}/addresses"
payload = { "addresses": ["<string>"] }
headers = {
"x-glacier-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://glacier-api.avax.network/v1/webhooks/{id}/addresses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'addresses' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-glacier-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://glacier-api.avax.network/v1/webhooks/{id}/addresses"
payload := strings.NewReader("{\n \"addresses\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-glacier-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://glacier-api.avax.network/v1/webhooks/{id}/addresses")
.header("x-glacier-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"addresses\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://glacier-api.avax.network/v1/webhooks/{id}/addresses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-glacier-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"addresses\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"url": "<string>",
"chainId": "<string>",
"createdAt": 123,
"name": "<string>",
"description": "<string>",
"eventType": "address_activity",
"metadata": {
"addresses": [
"<string>"
],
"eventSignatures": [
"<string>"
]
},
"includeInternalTxs": true,
"includeLogs": true
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}API Reference
Add addresses to EVM activity webhook
Add addresses to webhook. Only valid for EVM activity webhooks.
PATCH
/
v1
/
webhooks
/
{id}
/
addresses
JavaScript
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche();
async function run() {
const result = await avalanche.webhooks.addresses.add({
id: "f33de69c-d13b-4691-908f-870d6e2e6b04",
addressesChangeRequest: {
addresses: [
"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
],
},
});
console.log(result);
}
run();curl --request PATCH \
--url https://glacier-api.avax.network/v1/webhooks/{id}/addresses \
--header 'Content-Type: application/json' \
--header 'x-glacier-api-key: <api-key>' \
--data '
{
"addresses": [
"<string>"
]
}
'import requests
url = "https://glacier-api.avax.network/v1/webhooks/{id}/addresses"
payload = { "addresses": ["<string>"] }
headers = {
"x-glacier-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://glacier-api.avax.network/v1/webhooks/{id}/addresses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'addresses' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-glacier-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://glacier-api.avax.network/v1/webhooks/{id}/addresses"
payload := strings.NewReader("{\n \"addresses\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-glacier-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://glacier-api.avax.network/v1/webhooks/{id}/addresses")
.header("x-glacier-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"addresses\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://glacier-api.avax.network/v1/webhooks/{id}/addresses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-glacier-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"addresses\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"url": "<string>",
"chainId": "<string>",
"createdAt": 123,
"name": "<string>",
"description": "<string>",
"eventType": "address_activity",
"metadata": {
"addresses": [
"<string>"
],
"eventSignatures": [
"<string>"
]
},
"includeInternalTxs": true,
"includeLogs": true
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}Authorizations
Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.
Path Parameters
The webhook identifier.
Body
application/json
Ethereum address(es) for the address_activity event type
Example:
[
"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"
]
Response
Successful response
Available options:
active, inactive Available options:
address_activity Show child attributes
Show child attributes
Whether to include traces in the webhook payload.
Whether to include logs in the webhook payload.
Was this page helpful?
⌘I