REST API›Wallet & Transact›Webhook

POST

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

  • coin string required
    A 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.

  • type string enum required

    The type of event to listen to.

    block fires when a new block is seen on the coin network. wallet_confirmation fires when a wallet has been initialized and is supported for account-based coins only.

    blockwallet_confirmation
  • url string required

    The URL to fire the webhook to.

    Must be a publicly reachable URL.

  • label string

    The label of the new webhook.

    Free text that helps to tell webhooks apart.

  • numConfirmations number

    The 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

A webhook owned by a user for a coin, as returned when a block webhook is added.
  • id string required

    matches ^[0-9a-f]{32}$

  • created string date-time required
  • coin string required
    A cryptocurrency or token ticker symbol.
  • type string enum required
    The type of event the webhook listens to.
    blockwallet_confirmation
  • url string uri required
  • version number required
    2 for coins running on API v2.
  • state string enum required
    If 'active', indicates the webhook can trigger and send to the URL. If 'suspended', indicates the webhook can't trigger.
    activesuspended
  • successiveFailedAttempts number required
  • listenToFailureStates boolean required
    Whether or not to listen to failed transactions on chain.
  • label string
    Label of the new webhook.
  • scope string enum
    The scope of the webhook. Not stored for webhooks owned by a user, so usually absent.
    walletenterpriseorganizationsafe
  • userId string
    The ID of the user that owns the webhook.

    matches ^[0-9a-f]{32}$

  • numConfirmations number
    Number of confirmations before the webhook is triggered.
  • lastAttempt string date-time
  • failingSince string date-time
400
Bad Request

Response Body

object

  • name string
    Error code
  • context map of objects required
    Properties that apply to a specific error name
    context object
    • <key> object
  • error string required
    Human-readable error message
  • requestId string required
    Client request id
401
Unauthorized

Response Body

object

  • name string
    Error code
  • context map of objects required
    Properties that apply to a specific error name
    context object
    • <key> object
  • error string required
    Human-readable error message
  • requestId string required
    Client request id