Add block webhook
Adds a webhook that will result in an HTTP callback at the specified URL from BitGo when events are triggered. A user can have up to 5 webhooks of each type for a coin.
Path Params
-
coinstring requiredA cryptocurrency or token ticker symbol
Body Params
object
Add V2 Block Webhook Request Body
The request body for adding a webhook that calls the URL when a block is seen on the coin network, or when a wallet has been initialized.
-
typestring enum requiredThe type of event to listen to.
blockfires when a new block is seen on the coin network.wallet_confirmationfires when a wallet has been initialized and is supported for account-based coins only.blockwallet_confirmation -
urlstring requiredThe URL to fire the webhook to.
Must be a publicly reachable URL.
-
labelstringThe label of the new webhook.
Free text that helps to tell webhooks apart.
-
numConfirmationsnumberThe number of confirmations before the webhook is triggered.
If 0 or unspecified, requests are sent to the callback endpoint when the transfer is first seen and when it is confirmed.
Responses
200
OK
Response Body
object
-
idstring required -
createdstring date-time required -
coinstring requiredA cryptocurrency or token ticker symbol. -
typestring enum requiredThe type of event the webhook listens to.blockwallet_confirmation -
urlstring uri required -
versionnumber required2 for coins running on API v2. -
statestring enum requiredIf 'active', indicates the webhook can trigger and send to the URL. If 'suspended', indicates the webhook can't trigger.activesuspended -
successiveFailedAttemptsnumber required -
listenToFailureStatesboolean requiredWhether or not to listen to failed transactions on chain. -
labelstringLabel of the new webhook. -
scopestring enumThe scope of the webhook. Not stored for webhooks owned by a user, so usually absent.walletenterpriseorganizationsafe -
userIdstringThe ID of the user that owns the webhook. -
numConfirmationsnumberNumber of confirmations before the webhook is triggered. -
lastAttemptstring date-time -
failingSincestring date-time
400
Bad Request
Response Body
object
-
namestringError code -
contextmap of objects requiredProperties that apply to a specific error namecontext object
-
<key>object
-
-
errorstring requiredHuman-readable error message -
requestIdstring requiredClient request id
401
Unauthorized
Response Body
object
-
namestringError code -
contextmap of objects requiredProperties that apply to a specific error namecontext object
-
<key>object
-
-
errorstring requiredHuman-readable error message -
requestIdstring requiredClient request id