FireblocksSdk.Api.Webhook (FireblocksSdk v0.1.8)

View Source

Webhook V2 API module for Fireblocks SDK.

Summary

Functions

Creates a new webhook, which will be triggered on the specified events

Retrieve a webhook by its id

Retrieve a specific notification by its id.

Get notification attempts by notification id

Get all notifications by webhook id (paginated)

Get the status of a resend job

Get all webhooks (paginated)

Delete a webhook by its id

Resend a specific notification by its id.

Resend all failed notifications for a webhook, optionally filtered by resource ID.

Update a webhook by its id

Functions

create(webhook, idempotentKey \\ "")

Creates a new webhook, which will be triggered on the specified events

Endpoint Permission: Owner, Admin, Non-Signing Admin.

Options:

get(webhook_id)

Retrieve a webhook by its id

get_notification(notification \\ [])

Retrieve a specific notification by its id.

Options:

  • :includeData (boolean/0) - Whether to include notification data in the response. The default value is false.

  • :webhookId (String.t/0) - Required. The ID of the webhook to fetch

  • :notificationId (String.t/0) - Required. The ID of the notification to fetch

get_notification_attempts(notification \\ [])

Get notification attempts by notification id

Options:

  • :webhookId (String.t/0) - Required. The ID of the webhook to fetch

  • :notificationId (String.t/0) - Required. The ID of the notification to fetch

  • :pageCursor (String.t/0)

  • :pageSize (integer/0) - The default value is 10.

get_notifications(webhook)

Get all notifications by webhook id (paginated)

# Get notifications for a specific webhook
FireblocksSdk.Api.Webhook.get_notifications([
  webhookId: "wh_123abc",
  order: :desc,
  events: ["transaction.created", "embedded_wallet.asset.added"],
  statuses: [:failed],
  pageSize: 20
])

Options:

  • :webhookId (String.t/0) - Required.

  • :sortBy - Field to sort notifications by. Available values: :id, :createdAt, :updatedAt, :status, :eventType, :resourceId.

  • :order - available value: :asc, :desc

  • :pageCursor (String.t/0)

  • :pageSize (integer/0) - The default value is 10.

  • :startTime (integer/0) - Start time in milliseconds since epoch to filter by notifications created after this time (default 31 days ago)

  • :endTime (integer/0) - End time in milliseconds since epoch to filter by notifications created before this time (default current time)

  • :statuses - Filter notifications by status. Available values: :completed, :failed, :in_progress, :on_hold.

  • :events (list of String.t/0) - Available values : transaction.created, transaction.status.updated, transaction.approval_status.updated, transaction.network_records.processing_completed, external_wallet.asset.added, external_wallet.asset.removed, internal_wallet.asset.added, internal_wallet.asset.removed, contract_wallet.asset.added, contract_wallet.asset.removed, vault_account.created, vault_account.asset.added, vault_account.asset.balance_updated, embedded_wallet.status.updated, embedded_wallet.created, embedded_wallet.asset.balance_updated, embedded_wallet.asset.added, embedded_wallet.account.created, embedded_wallet.device.added, onchain_data.updated, connection.added, connection.removed, connection.request.waiting_peer_approval, connection.request.rejected_by_peer

  • :resourceId (String.t/0)

get_resend_job_status(webhook_id, job_id)

Get the status of a resend job

list(webhook)

Get all webhooks (paginated)

Options:

  • :order - available value: :asc, :desc The default value is :desc.

  • :pageCursor (String.t/0)

  • :pageSize (integer/0) - The default value is 10.

remove(webhook_id)

Delete a webhook by its id

Endpoint Permission: Owner, Admin, Non-Signing Admin.

resend(notification \\ [], idempotentKey \\ "")

Resend a specific notification by its id.

Endpoint Permission: Owner, Admin, Non-Signing Admin, Editor, Signer.

Options:

  • :webhookId (String.t/0) - Required. The ID of the webhook to resend notification for

  • :notificationId (String.t/0) - Required. The ID of the notification to resend

resend_by_resource(notification \\ [], idempotentKey \\ "")

Resend notifications by resource ID.

Endpoint Permission: Owner, Admin, Non-Signing Admin, Editor, Signer.

Options:

  • :webhookId (String.t/0) - Required. The ID of the webhook to resend notifications for

  • :resourceId (String.t/0) - Required. The resource ID to resend notifications for

  • :excludeStatuses - Filter notifications by status. Available values: :completed, :failed, :in_progress, :on_hold.

resend_failed(notification \\ [], idempotentKey \\ "")

Resend all failed notifications for a webhook, optionally filtered by resource ID.

Endpoint Permission: Owner, Admin, Non-Signing Admin, Editor, Signer.

Options:

  • :webhookId (String.t/0) - Required. The ID of the webhook to resend failed notifications for

  • :startTime (integer/0) - Start time in milliseconds since epoch to filter by notifications created after this time (default 31 days ago)

  • :events (list of String.t/0) - Available values : transaction.created, transaction.status.updated, transaction.approval_status.updated, transaction.network_records.processing_completed, external_wallet.asset.added, external_wallet.asset.removed, internal_wallet.asset.added, internal_wallet.asset.removed, contract_wallet.asset.added, contract_wallet.asset.removed, vault_account.created, vault_account.asset.added, vault_account.asset.balance_updated, embedded_wallet.status.updated, embedded_wallet.created, embedded_wallet.asset.balance_updated, embedded_wallet.asset.added, embedded_wallet.account.created, embedded_wallet.device.added, onchain_data.updated, connection.added, connection.removed, connection.request.waiting_peer_approval, connection.request.rejected_by_peer

update(webhook, idempotentKey \\ "")

Update a webhook by its id

Endpoint Permission: Owner, Admin, Non-Signing Admin.

Options: