/api/v2/{coin}/wallet/{walletId}/webhooks
Add a webhook that will result in an HTTP callback at the specified URL from BitGo when events are triggered. There is a limit of 10 webhooks of each type per wallet.
Types of wallet webhooks available:
Note that an unconfirmed webhook notification won't be triggered if a transaction is confirmed on chain immediately after it is sent, or if is an RBF transaction. API users are not supposed to expect 'unconfirmed' notifications in these cases.
coin
stringRequired"btc"
walletId
stringRequired"59cd72485007a239fb00282ed480da1f"
^[0-9a-f]{32}$
type
string required transfer
transaction
pendingapproval
address_confirmation
lowFee
transfer
allToken
boolean false
url
string <uri>
required http://your.server.com/webhook
label
string numConfirmations
integer >= 0
6
listenToFailureStates
boolean 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
var walletId = '58d99…39604'; var url = 'http://your.server.com/webhook'; bitgo .coin('tbtc') .wallets() .get({ id: walletId }) .then(function (wallet) { return wallet.addWebhook({ url: url, type: 'transfer', }); }) .then(function (webhook) { // print the new webhook console.dir(webhook); });
allToken
boolean false
label
string Test Webhook
created
string <date-time>
{}
url
string <uri>
required https://your.server.com/webhook
version
integer 2
numConfirmations
integer 6
state
string active
suspended
active
successiveFailedAttempts
integer 0
walletId
string allowBlockedHosts
boolean error
string required requestId
string required context
object name
string required