/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:
coin
stringRequired"btc"
type
string required block
wallet_confirmation
block
url
string <uri>
required http://your.server.com/webhook
label
string numConfirmations
integer >= 0
6
1 2 3 4 5 6 7 8 9 10 11 12 13
var baseCoin = bitgo.coin('tbtc'); var webhooks = baseCoin.webhooks(); webhooks .add({ url: 'http://your.server.com/user_webhook', type: 'block', label: 'Test User Webhook', numConfirmations: 1, }) .then(function (result) { console.dir(result); });
type
string null
userId
string 59cd72485007a239fb00282ed480da1f
^[0-9a-f]{32}$
id
string 59cd72485007a239fb00282ed480da1f
^[0-9a-f]{32}$
label
string Test Webhook
created
string <date-time>
{}
coin
string btc
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 allToken
boolean error
string required requestId
string required context
object name
string required