# `FireblocksSdk.Api.Webhook`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/webhook.ex#L1)

Webhook V2 API module for Fireblocks SDK.

# `create`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/webhook.ex#L24)

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

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

Options:
* `:url` (`t:String.t/0`) - Required.

* `:description` (`t:String.t/0`)

* `:events` (list of `t:String.t/0`) - Required.

* `:enabled` (`t:boolean/0`) - The default value is `false`.

# `get`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/webhook.ex#L55)

Retrieve a webhook by its id

# `get_notification`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/webhook.ex#L167)

Retrieve a specific notification by its id.

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

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

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

# `get_notification_attempts`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/webhook.ex#L194)

Get notification attempts by notification id

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

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

* `:pageCursor` (`t:String.t/0`)

* `:pageSize` (`t:integer/0`) - The default value is `10`.

# `get_notifications`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/webhook.ex#L137)

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` (`t:String.t/0`) - Required.

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

* `:order` - available value: `:asc`, `:desc`

* `:pageCursor` (`t:String.t/0`)

* `:pageSize` (`t:integer/0`) - The default value is `10`.

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

* `:endTime` (`t: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 `t: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` (`t:String.t/0`)

# `get_resend_job_status`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/webhook.ex#L328)

Get the status of a resend job

# `list`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/webhook.ex#L41)

Get all webhooks (paginated)

Options:
* `:order` - available value: `:asc`, `:desc` The default value is `:desc`.

* `:pageCursor` (`t:String.t/0`)

* `:pageSize` (`t:integer/0`) - The default value is `10`.

# `remove`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/webhook.ex#L84)

Delete a webhook by its id

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

# `resend`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/webhook.ex#L226)

Resend a specific notification by its id.

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

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

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

# `resend_by_resource`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/webhook.ex#L264)

Resend notifications by resource ID.

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

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

* `:resourceId` (`t: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`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/webhook.ex#L308)

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

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

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

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

* `:events` (list of `t: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`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/webhook.ex#L73)

Update a webhook by its id

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

Options:
* `:url` (`t:String.t/0`)

* `:description` (`t:String.t/0`)

* `:events` (list of `t:String.t/0`)

* `:enabled` (`t:boolean/0`) - The default value is `false`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
