Ava Labs Webhooks API
Manage webhooks and get notified for various onchain activities.
Manage webhooks and get notified for various onchain activities.
openapi: 3.1.0
info:
title: Data AVAX Supply Webhooks API
description: The Data API provides web3 application developers with multi-chain data related to Avalanche's primary network, Avalanche subnets, and Ethereum. With Data API, you can easily build products that leverage real-time and historical transaction and transfer history, native and token balances, and various types of token metadata. The API is in Beta and may be subject to change.</br></br>If you have feedback or feature requests for the API, please submit them <a href="https://portal.productboard.com/dndv9ahlkdfye4opdm8ksafi/tabs/4-glacier-api">here</a>. Bug reports can be submitted <a href="https://docs.google.com/forms/d/e/1FAIpQLSeJQrcp7QoNiqozMDKrVJGX5wpU827d3cVTgF8qa7t_J1Pb-g/viewform">here</a>, and any potential security issues can be reported <a href="https://immunefi.com/bounty/avalabs">here</a>.
version: 1.0.0
contact: {}
servers:
- url: https://glacier-api.avax.network
security:
- apiKey: []
- {}
tags:
- name: Webhooks
description: Manage webhooks and get notified for various onchain activities.
paths:
/v1/webhooks:
post:
operationId: createWebhook
x-speakeasy-group: webhooks
x-speakeasy-name-override: create
x-execution-weight: medium
summary: Create a webhook
description: Create a new webhook.
requestBody:
required: true
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/EVMAddressActivityRequest'
- $ref: '#/components/schemas/PrimaryNetworkAddressActivityRequest'
- $ref: '#/components/schemas/ValidatorActivityRequest'
responses:
'201':
description: Successful response
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/EVMAddressActivityResponse'
- $ref: '#/components/schemas/PrimaryNetworkAddressActivityResponse'
- $ref: '#/components/schemas/ValidatorActivityResponse'
'400':
description: "Bad requests generally mean the client has passed invalid \n or malformed parameters. Error messages in the response could help in \n evaluating the error."
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'401':
description: "When a client attempts to access resources that require \n authorization credentials but the client lacks proper authentication \n in the request, the server responds with 401."
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
'403':
description: "When a client attempts to access resources with valid\n credentials but doesn't have the privilege to perform that action, \n the server responds with 403."
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: "The error is mostly returned when the client requests\n with either mistyped URL, or the passed resource is moved or deleted, \n or the resource doesn't exist."
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'429':
description: "This error is returned when the client has sent too many,\n and has hit the rate limit."
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: "The error is a generic server side error that is \n returned for any uncaught and unexpected issues on the server side. \n This should be very rare, and you may reach out to us if the problem \n persists for a longer duration."
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
'502':
description: "This is an internal error indicating invalid response \n received by the client-facing proxy or gateway from the upstream server."
content:
application/json:
schema:
$ref: '#/components/schemas/BadGateway'
'503':
description: "The error is returned for certain routes on a particular\n Subnet. This indicates an internal problem with our Subnet node, and may \n not necessarily mean the Subnet is down or affected."
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceUnavailable'
tags:
- Webhooks
x-codeSamples:
- lang: javascript
label: JavaScript
source: "import { Avalanche } from \"@avalanche-sdk/chainkit\";\n\nconst avalanche = new Avalanche();\n\nasync function run() {\n const result = await avalanche.webhooks.create({\n eventType: \"address_activity\",\n url: \"https://sophisticated-exterior.org/\",\n chainId: \"<id>\",\n metadata: {\n eventSignatures: [\n \"0x61cbb2a3dee0b6064c2e681aadd61677fb4ef319f0b547508d495626f5a62f64\",\n ],\n addresses: [\n \"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E\",\n ],\n },\n });\n\n console.log(result);\n}\n\nrun();"
get:
operationId: listWebhooks
x-execution-weight: small
x-speakeasy-group: webhooks
x-speakeasy-name-override: list
x-speakeasy-pagination:
type: cursor
inputs:
- name: pageToken
in: parameters
type: cursor
outputs:
nextCursor: $.nextPageToken
summary: List webhooks
description: Lists webhooks for the user.
parameters:
- name: pageToken
required: false
in: query
description: A page token, received from a previous list call. Provide this to retrieve the subsequent page.
schema:
type: string
- name: pageSize
required: false
in: query
description: The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
schema:
type: integer
default: 10
minimum: 1
maximum: 100
example: '10'
- name: status
required: false
in: query
example: active
description: Status of the webhook. Use "active" to return only active webhooks, "inactive" to return only inactive webhooks. Else if no status is provided, all configured webhooks will be returned.
schema:
$ref: '#/components/schemas/WebhookStatus'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/ListWebhooksResponse'
'400':
description: "Bad requests generally mean the client has passed invalid \n or malformed parameters. Error messages in the response could help in \n evaluating the error."
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'401':
description: "When a client attempts to access resources that require \n authorization credentials but the client lacks proper authentication \n in the request, the server responds with 401."
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
'403':
description: "When a client attempts to access resources with valid\n credentials but doesn't have the privilege to perform that action, \n the server responds with 403."
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: "The error is mostly returned when the client requests\n with either mistyped URL, or the passed resource is moved or deleted, \n or the resource doesn't exist."
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'429':
description: "This error is returned when the client has sent too many,\n and has hit the rate limit."
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: "The error is a generic server side error that is \n returned for any uncaught and unexpected issues on the server side. \n This should be very rare, and you may reach out to us if the problem \n persists for a longer duration."
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
'502':
description: "This is an internal error indicating invalid response \n received by the client-facing proxy or gateway from the upstream server."
content:
application/json:
schema:
$ref: '#/components/schemas/BadGateway'
'503':
description: "The error is returned for certain routes on a particular\n Subnet. This indicates an internal problem with our Subnet node, and may \n not necessarily mean the Subnet is down or affected."
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceUnavailable'
tags:
- Webhooks
x-codeSamples:
- lang: javascript
label: JavaScript
source: "import { Avalanche } from \"@avalanche-sdk/chainkit\";\n\nconst avalanche = new Avalanche();\n\nasync function run() {\n const result = await avalanche.webhooks.list({\n pageSize: 10,\n status: \"active\",\n });\n\n for await (const page of result) {\n console.log(page);\n }\n}\n\nrun();"
/v1/webhooks/{id}:
get:
operationId: getWebhook
x-execution-weight: small
x-speakeasy-group: webhooks
x-speakeasy-name-override: get
summary: Get a webhook by ID
description: Retrieves a webhook by ID.
parameters:
- name: id
required: true
in: path
description: The webhook identifier.
example: f33de69c-d13b-4691-908f-870d6e2e6b04
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/EVMAddressActivityResponse'
- $ref: '#/components/schemas/PrimaryNetworkAddressActivityResponse'
- $ref: '#/components/schemas/ValidatorActivityResponse'
'400':
description: "Bad requests generally mean the client has passed invalid \n or malformed parameters. Error messages in the response could help in \n evaluating the error."
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'401':
description: "When a client attempts to access resources that require \n authorization credentials but the client lacks proper authentication \n in the request, the server responds with 401."
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
'403':
description: "When a client attempts to access resources with valid\n credentials but doesn't have the privilege to perform that action, \n the server responds with 403."
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: "The error is mostly returned when the client requests\n with either mistyped URL, or the passed resource is moved or deleted, \n or the resource doesn't exist."
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'429':
description: "This error is returned when the client has sent too many,\n and has hit the rate limit."
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: "The error is a generic server side error that is \n returned for any uncaught and unexpected issues on the server side. \n This should be very rare, and you may reach out to us if the problem \n persists for a longer duration."
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
'502':
description: "This is an internal error indicating invalid response \n received by the client-facing proxy or gateway from the upstream server."
content:
application/json:
schema:
$ref: '#/components/schemas/BadGateway'
'503':
description: "The error is returned for certain routes on a particular\n Subnet. This indicates an internal problem with our Subnet node, and may \n not necessarily mean the Subnet is down or affected."
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceUnavailable'
tags:
- Webhooks
x-codeSamples:
- lang: javascript
label: JavaScript
source: "import { Avalanche } from \"@avalanche-sdk/chainkit\";\n\nconst avalanche = new Avalanche();\n\nasync function run() {\n const result = await avalanche.webhooks.get({\n id: \"f33de69c-d13b-4691-908f-870d6e2e6b04\",\n });\n\n console.log(result);\n}\n\nrun();"
delete:
operationId: deactivateWebhook
x-speakeasy-group: webhooks
x-speakeasy-name-override: deactivate
x-execution-weight: medium
summary: Deactivate a webhook
description: Deactivates a webhook by ID.
parameters:
- name: id
required: true
in: path
description: The webhook identifier.
example: f33de69c-d13b-4691-908f-870d6e2e6b04
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/EVMAddressActivityResponse'
- $ref: '#/components/schemas/PrimaryNetworkAddressActivityResponse'
- $ref: '#/components/schemas/ValidatorActivityResponse'
'400':
description: "Bad requests generally mean the client has passed invalid \n or malformed parameters. Error messages in the response could help in \n evaluating the error."
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'401':
description: "When a client attempts to access resources that require \n authorization credentials but the client lacks proper authentication \n in the request, the server responds with 401."
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
'403':
description: "When a client attempts to access resources with valid\n credentials but doesn't have the privilege to perform that action, \n the server responds with 403."
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: "The error is mostly returned when the client requests\n with either mistyped URL, or the passed resource is moved or deleted, \n or the resource doesn't exist."
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'429':
description: "This error is returned when the client has sent too many,\n and has hit the rate limit."
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: "The error is a generic server side error that is \n returned for any uncaught and unexpected issues on the server side. \n This should be very rare, and you may reach out to us if the problem \n persists for a longer duration."
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
'502':
description: "This is an internal error indicating invalid response \n received by the client-facing proxy or gateway from the upstream server."
content:
application/json:
schema:
$ref: '#/components/schemas/BadGateway'
'503':
description: "The error is returned for certain routes on a particular\n Subnet. This indicates an internal problem with our Subnet node, and may \n not necessarily mean the Subnet is down or affected."
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceUnavailable'
tags:
- Webhooks
x-codeSamples:
- lang: javascript
label: JavaScript
source: "import { Avalanche } from \"@avalanche-sdk/chainkit\";\n\nconst avalanche = new Avalanche();\n\nasync function run() {\n const result = await avalanche.webhooks.deactivate({\n id: \"f33de69c-d13b-4691-908f-870d6e2e6b04\",\n });\n\n console.log(result);\n}\n\nrun();"
patch:
operationId: updateWebhook
x-speakeasy-group: webhooks
x-speakeasy-name-override: update
x-execution-weight: medium
summary: Update a webhook
description: Updates an existing webhook.
parameters:
- name: id
required: true
in: path
description: The webhook identifier.
example: f33de69c-d13b-4691-908f-870d6e2e6b04
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateWebhookRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/EVMAddressActivityResponse'
- $ref: '#/components/schemas/PrimaryNetworkAddressActivityResponse'
- $ref: '#/components/schemas/ValidatorActivityResponse'
'400':
description: "Bad requests generally mean the client has passed invalid \n or malformed parameters. Error messages in the response could help in \n evaluating the error."
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'401':
description: "When a client attempts to access resources that require \n authorization credentials but the client lacks proper authentication \n in the request, the server responds with 401."
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
'403':
description: "When a client attempts to access resources with valid\n credentials but doesn't have the privilege to perform that action, \n the server responds with 403."
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: "The error is mostly returned when the client requests\n with either mistyped URL, or the passed resource is moved or deleted, \n or the resource doesn't exist."
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'429':
description: "This error is returned when the client has sent too many,\n and has hit the rate limit."
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: "The error is a generic server side error that is \n returned for any uncaught and unexpected issues on the server side. \n This should be very rare, and you may reach out to us if the problem \n persists for a longer duration."
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
'502':
description: "This is an internal error indicating invalid response \n received by the client-facing proxy or gateway from the upstream server."
content:
application/json:
schema:
$ref: '#/components/schemas/BadGateway'
'503':
description: "The error is returned for certain routes on a particular\n Subnet. This indicates an internal problem with our Subnet node, and may \n not necessarily mean the Subnet is down or affected."
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceUnavailable'
tags:
- Webhooks
x-codeSamples:
- lang: javascript
label: JavaScript
source: "import { Avalanche } from \"@avalanche-sdk/chainkit\";\n\nconst avalanche = new Avalanche();\n\nasync function run() {\n const result = await avalanche.webhooks.update({\n id: \"f33de69c-d13b-4691-908f-870d6e2e6b04\",\n updateWebhookRequest: {},\n });\n\n console.log(result);\n}\n\nrun();"
/v1/webhooks:generateOrRotateSharedSecret:
post:
operationId: generateOrRotateSharedSecret
x-speakeasy-group: webhooks
x-execution-weight: medium
summary: Generate or rotate a shared secret
description: Generates a new shared secret or rotate an existing one.
responses:
'201':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/SharedSecretsResponse'
'400':
description: "Bad requests generally mean the client has passed invalid \n or malformed parameters. Error messages in the response could help in \n evaluating the error."
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'401':
description: "When a client attempts to access resources that require \n authorization credentials but the client lacks proper authentication \n in the request, the server responds with 401."
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
'403':
description: "When a client attempts to access resources with valid\n credentials but doesn't have the privilege to perform that action, \n the server responds with 403."
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: "The error is mostly returned when the client requests\n with either mistyped URL, or the passed resource is moved or deleted, \n or the resource doesn't exist."
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'429':
description: "This error is returned when the client has sent too many,\n and has hit the rate limit."
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: "The error is a generic server side error that is \n returned for any uncaught and unexpected issues on the server side. \n This should be very rare, and you may reach out to us if the problem \n persists for a longer duration."
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
'502':
description: "This is an internal error indicating invalid response \n received by the client-facing proxy or gateway from the upstream server."
content:
application/json:
schema:
$ref: '#/components/schemas/BadGateway'
'503':
description: "The error is returned for certain routes on a particular\n Subnet. This indicates an internal problem with our Subnet node, and may \n not necessarily mean the Subnet is down or affected."
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceUnavailable'
tags:
- Webhooks
x-codeSamples:
- lang: javascript
label: JavaScript
source: "import { Avalanche } from \"@avalanche-sdk/chainkit\";\n\nconst avalanche = new Avalanche();\n\nasync function run() {\n const result = await avalanche.webhooks.generateOrRotateSharedSecret();\n\n console.log(result);\n}\n\nrun();"
/v1/webhooks:getSharedSecret:
get:
operationId: getSharedSecret
x-speakeasy-group: webhooks
x-execution-weight: small
summary: Get a shared secret
description: Get a previously generated shared secret.
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/SharedSecretsResponse'
'400':
description: "Bad requests generally mean the client has passed invalid \n or malformed parameters. Error messages in the response could help in \n evaluating the error."
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'401':
description: "When a client attempts to access resources that require \n authorization credentials but the client lacks proper authentication \n in the request, the server responds with 401."
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
'403':
description: "When a client attempts to access resources with valid\n credentials but doesn't have the privilege to perform that action, \n the server responds with 403."
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: "The error is mostly returned when the client requests\n with either mistyped URL, or the passed resource is moved or deleted, \n or the resource doesn't exist."
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'429':
description: "This error is returned when the client has sent too many,\n and has hit the rate limit."
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: "The error is a generic server side error that is \n returned for any uncaught and unexpected issues on the server side. \n This should be very rare, and you may reach out to us if the problem \n persists for a longer duration."
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
'502':
description: "This is an internal error indicating invalid response \n received by the client-facing proxy or gateway from the upstream server."
content:
application/json:
schema:
$ref: '#/components/schemas/BadGateway'
'503':
description: "The error is returned for certain routes on a particular\n Subnet. This indicates an internal problem with our Subnet node, and may \n not necessarily mean the Subnet is down or affected."
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceUnavailable'
tags:
- Webhooks
x-codeSamples:
- lang: javascript
label: JavaScript
source: "import { Avalanche } from \"@avalanche-sdk/chainkit\";\n\nconst avalanche = new Avalanche();\n\nasync function run() {\n const result = await avalanche.webhooks.getSharedSecret();\n\n console.log(result);\n}\n\nrun();"
/v1/webhooks/{id}/addresses:
patch:
operationId: addAddressesToWebhook
x-speakeasy-group: webhooks.addresses
x-speakeasy-name-override: add
x-execution-weight: medium
summary: Add addresses to EVM activity webhook
description: Add addresses to webhook. Only valid for EVM activity webhooks.
parameters:
- name: id
required: true
in: path
description: The webhook identifier.
example: f33de69c-d13b-4691-908f-870d6e2e6b04
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AddressesChangeRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/EVMAddressActivityResponse'
'400':
description: "Bad requests generally mean the client has passed invalid \n or malformed parameters. Error messages in the response could help in \n evaluating the error."
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'401':
description: "When a client attempts to access resources that require \n authorization credentials but the client lacks proper authentication \n in the request, the server responds with 401."
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
'403':
description: "When a client attempts to access resources with valid\n credentials but doesn't have the privilege to perform that action, \n the server responds with 403."
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: "The error is mostly returned when the client requests\n with either mistyped URL, or the passed resource is moved or deleted, \n or the resource doesn't exist."
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'429':
description: "This error is returned when the client has sent too many,\n and has hit the rate limit."
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: "The error is a generic server side error that is \n returned for any uncaught and unexpected issues on the server side. \n This should be very rare, and you may reach out to us if the problem \n persists for a longer duration."
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
'502':
description: "This is an internal error indicating invalid response \n received by the client-facing proxy or gateway from the upstream server."
content:
application/json:
schema:
$ref: '#/components/schemas/BadGateway'
'503':
description: "The error is returned for certain routes on a particular\n Subnet. This indicates an internal problem with our Subnet node, and may \n not necessarily mean the Subnet is down or affected."
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceUnavailable'
tags:
- Webhooks
# --- truncated at 32 KB (59 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/ava-labs/refs/heads/main/openapi/ava-labs-webhooks-api-openapi.yml