/api/v2/{coin}/wallet/{walletId}/webhooks
Add a webhook to a wallet that sends an HTTP callback from BitGo to a specified URL when specific conditions occur. A wallet can have up to 10 webhooks of each wallet-webhook type. Wallet-webhook types:
Note: Unconfirmed webhook notifications don't trigger for RBF transactions, or if a transaction confirms on chain immediately after it's sent. BitGo doesn't send 'unconfirmed' notifications in these cases.
coin
stringRequired"btc"
walletId
stringRequired"59cd72485007a239fb00282ed480da1f"
^[0-9a-f]{32}$
type
string required txRequest
txRequestTransaction
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
id
string 59cd72485007a239fb00282ed480da1f
^[0-9a-f]{32}$
label
string Test Webhook
created
string <date-time>
{}
coin
string btc
type
string txRequest
txRequestTransaction
transfer
transaction
pendingapproval
address_confirmation
lowFee
transfer
url
string <uri>
required https://your.server.com/webhook
version
integer 2
numConfirmations
integer 6
state
string active
suspended
active
lastAttempt
string <date-time>
{}
failingSince
string <date-time>
{}
successiveFailedAttempts
integer 0
walletId
string allowBlockedHosts
boolean txRequestStates
array[string] initialized
pendingApproval
pendingUserCommitment
pendingUserRShare
pendingUserGShare
readyToSend
pendingUserSignature
pendingDelivery
signed
delivered
canceled
rejected
failed
txRequestTransactionStates
array[string] initialized
pendingSignature
eddsaPendingCommitment
eddsaPendingRShare
eddsaPendingGShare
readyToCombineShares
signed
held
delivered
invalidSignature
rejected
error
string required requestId
string required context
object name
string required