---
title: "Add block webhook"
method: POST
path: "/api/v2/{coin}/webhooks"
tags: ["Webhook"]
---

# Add block webhook

`POST /api/v2/{coin}/webhooks`

Adds a webhook that will result in an HTTP callback at the
specified URL from BitGo when events are triggered.

Types of block webhooks:

1. Block webhooks will fire when a new block is seen on the coin network.
2. Wallet confirmation webhooks will fire when a wallet has been initialized.

## Path parameters

- `coin` string, required — A cryptocurrency or token ticker symbol.

## Request body

- CreateBlockWebhook
  - `type` 'block' | 'wallet_confirmation', required
  - `url` string, uri, required — URL to fire the webhook to.
  - `label` string — Label of the new webhook.
  - `numConfirmations` integer — Number of confirmations before triggering the webhook. If 0 or unspecified, requests will be sent to the callback endpoint when the transfer is first seen and when it is confirmed.

## Response `200`

OK

- object
  - `type` 'block' — Event type to listen to.
  - `userId` string
  - `id` string
  - `label` string
  - `created` string, date-time
  - `coin` string — A cryptocurrency or token ticker symbol.
  - `url` string, uri, required
  - `version` integer — 2 for coins running on API v2.
  - `numConfirmations` integer
  - `state` 'active' | 'suspended' — If `active`, indicates the webhook can trigger and send to the URL. If `suspended`, indicates the webhook can't trigger.
  - `lastAttempt` string, date-time
  - `failingSince` string, date-time
  - `successiveFailedAttempts` integer
  - `walletId` string
  - `allowBlockedHosts` boolean
  - `allToken` boolean
  - `txRequestStates` TransactionRequestState1[] — If present, only transaction request state changes from the list will trigger notifications. If not present, all transaction request state changes will trigger notifications.
  - `txRequestTransactionStates` TransactionState1[] — If present, only transaction request transaction state changes from the list will trigger notifications. If not present, all transaction request transaction state changes will trigger notifications.
  - `identityStatus` IdentityStatus[] — If present, only identity status changes from the list will trigger notifications. If not present, all identity status changes will trigger notifications.
  - `userKycState` VerifiedKycState[] — If present, only user kyc state changes from the list will trigger notifications. If not present, all kyc state changes will trigger notifications.
  - `enterpriseKycState` VerifiedKycState[] — If present, only enterprise kyc state changes from the list will trigger notifications. If not present, all kyc state changes will trigger notifications.

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/bitgo/apis/bitgo-api.md) · [All operations](https://skmtc.net/bitgo/apis/bitgo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bitgo/bitgo-api/revisions/e445c15e5bee/schema)
