REST API›Wallet & Transact›Webhook

POST

Simulates and tests a webhook so you can view its response. A transferId, pendingApprovalId, txRequestId or txHash is required, unless usePlaceholderData is true. Requires admin permission on the wallet.

Path Params

  • coin string required
    A cryptocurrency or token ticker symbol
  • walletId string required
    The ID of the wallet
  • webhookId string required
    The ID of the webhook to simulate

Query Params

  • prevId string
    The ID returned as nextBatchPrevId by a previous response, to fetch the next page of notifications
  • limit string number
    Maximum number of notifications to return
  • hash string
    Return only the notifications for this transaction hash

Body Params

object

Simulate V2 Wallet Webhook Request Body

The request body for simulating a wallet webhook: exactly one of the identifiers below, chosen by the type of the webhook, or the flag to use placeholder data.

  • transferId string

    The ID of a transfer on the specified wallet.

    Must be provided if the webhook is of type transfer.

  • pendingApprovalId string

    The ID of a pending approval on the specified wallet.

    Must be provided if the webhook is of type pendingapproval.

  • txRequestId string

    The ID of a transaction request on the specified wallet.

    Must be provided if the webhook is of type txRequest or txRequestTransaction.

  • txHash string

    The hash of a specific transaction for the specified coin.

    Must be provided if the webhook is of type transaction or transaction_finality_on_l1.

  • usePlaceholderData boolean

    Whether the simulated webhook should use generated placeholder data.

    When true, no real transfer, pending approval, transaction request or transaction is needed.

Responses

200
OK

Response Body

object

The webhook notifications of the webhook owner after a simulation, newest first.
  • webhookNotifications array of objects required
    webhookNotifications object
    • id string required

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

    • idempotencyKey string
      Unique ID that can be used to de-duplicate notifications.
    • type string
      The type of event that created the notification.
    • wallet string
      The ID of the wallet the notification belongs to.
    • enterprise string
      The ID of the enterprise the notification belongs to.
    • organization string
      The ID of the organization the notification belongs to.
    • bankAccount string
      The ID of the bank account the notification belongs to.
    • url string uri
    • hash string
      A transaction hash for transactions, or a block hash for block notifications.
    • coin string
      A cryptocurrency or token ticker symbol.
    • coinChain string
      The chain the coin belongs to.
    • transfer string
      The ID of the transfer the notification belongs to.
    • state string
      Delivery state of the notification, for example new or processed.
    • simulation boolean
      Whether the notification was created by a simulation.
    • retries number
      The number of retries that have been attempted for this notification.
    • webhook string
      The ID of the webhook that created the notification.
    • updatedAt string date-time
    • nextAttempt string date-time
    • version number
      2 for coins running on API v2.
    • allowBlockedHosts boolean
      Whether the notification may be sent to blocked hosts. Admin only.
    • heightToConfirm number
      The block height at which the notification is sent. Admin only.
    • payload string
      The payload that was sent to the URL. Admin only.
    • response object
      The response that the URL returned. Admin only.
      response object
      • code number or string
      • type string
      • body string
      • error string
  • nextBatchPrevId string
    The ID to pass as prevId to fetch the next page. Present only when more notifications exist.
400
Bad Request

Response Body

ONE OF

  • 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
404
Not Found

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