Want to learn more about Alchemy Notify? Check out this guide on webhooks.
We recommend using this Notify API to automate the creation of webhooks and when dealing with Address Activity Webhooks for 10+ addresses, otherwise, you can easily create webhooks from the dashboard!
Your Alchemy authentication token (X-Alchemy-Token
) can be found in the upper right corner of your dashboard Notify page under the "AUTH TOKEN" button.
Your app_id
can be found within the URL of your specific app. For example, given the URL https://dashboard.alchemyapi.io/apps/xfu8frt3wf94j7h5 your app_id
would be xfu8frt3wf94j7h5
Each type of webhook is represented as a different integer:
Mined Transactions: 0
Dropped Transactions: 1
Address Activity: 4
Gas Price: 5
This is a unique identifier for the webhook. You can find the webhook_id by first getting all your webhooks using the endpoint below, then looking at the parameter "id"
for the specific webhook you want.
{"data": [{"id": 3,"app_id": "nd7cdkfe3cb4","network": 0,"webhook_type": 1,"webhook_url": "http://www.YOUR-APP-URL.com","is_active": true,"time_created": 1585779080000,"addresses": null},{"id": 17,"app_id": "pd63r8git3dlll0n","network": 0,"webhook_type": 4,"webhook_url": "http://www.YOUR-APP-URL.com","is_active": true,"time_created": 1596635655000,"addresses": ["0xfdb16996831753d5331ff813c29a93c76834a0ad","0x6b175474e89094c44da98b954eedeac495271d0f","0x48ea66f94518534ecbc863fbf521896d52b025d9","0xdac17f958d2ee523a2206206994597c13d831ec7","0x6f8d0c2a2c3a189803f5c6482c88be46a55058c1"]}]}
curl https://dashboard.alchemyapi.io/api/team-webhooks \-X GET \-H "X-Alchemy-Token":"your-X-Alchemy-Token"
{"data": {"id": 103,"app_id": "nfu9f1t9fwf15r36","network": 0,"webhook_type": 1,"webhook_url": "https://webhook.site/7bf2c41e-846e-45a7-8c17-556dd7f5103c","is_active": true,"time_created": 1602618909000,"addresses": null,"gas_price_low": null,"gas_price_high": null,"gas_price_type": null}}
Here is an example request for creating a dropped transaction webhook
curl https://dashboard.alchemyapi.io/api/create-webhook \-X POST \-H "X-Alchemy-Token":"your-X-Alchemy-Token" \-d '{"app_id":"your-app_id","webhook_type":1,"webhook_url":"https://webhook.site/7bf2c41e-846e-45a7-8c17-556dd7f5103c"}'
{}
{}
curl https://dashboard.alchemyapi.io/api/update-webhook-addresses \-X PUT \-H "X-Alchemy-Token":"your-X-Alchemy-Token" \-d '{"webhook_id":104,"addresses":["0x6f8d0c2a2c3a189803f5c6482c88be46a55058c1","0xfdb16996831753d5331ff813c29a93c76834a0ad"]}'
curl https://dashboard.alchemyapi.io/api/update-webhook-addresses \-X PATCH \-H "X-Alchemy-Token":"your-X-Alchemy-Token" \-d '{"webhook_id":27,"addresses_to_add":["0xfdb16996831753d5331ff813c29a93c76834a0ad","0x48ea66f94518534ecbc863fbf521896d52b025d9", "0x6f8d0c2a2c3a189803f5c6482c88be46a55058c1"], "addresses_to_remove":[]}'
active
or inactive
. {}
curl https://dashboard.alchemyapi.io/api/update-webhook \-X PUT \-H "X-Alchemy-Token":"your-X-Alchemy-Token" \-d '{"webhook_id":104,"is_active":False}'
{}
curl https://dashboard.alchemyapi.io/api/delete-webhook \-X DELETE \-H "X-Alchemy-Token":"your-X-Alchemy-Token" \-d '{"webhook_id":104}'