> For the complete documentation index, see [llms.txt](https://balance-1.gitbook.io/balance-custody-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://balance-1.gitbook.io/balance-custody-api/webhooks.md).

# Webhooks

This page describes webhooks that may be sent to a destination configured by the custodian. You must contact your custodian and provide a URL for these webhooks to be sent.

* [Webhooks](/balance-custody-api/webhooks.md)
  * [Deposit Received](#deposit-received)
  * [Withdrawal Broadcast](#withdrawal-broadcast)
  * [Withdrawal Confirmed](#withdrawal-confirmed)
  * [Transaction Status Changed](#transaction-status-changed)
  * [Direct Party Approved](#direct-party-approved)
  * [Direct Party Rejected](#direct-party-rejected)

## Deposit Received

This will be sent when a deposit is received from an address outside of your Custody instance.

#### Request details

A request will be made to the configured URL with a content type of `application/json` and a body containing the ID of the deposit transaction.

```
{
  "type": "deposit",
  "transaction_id": 123
}
```

## Withdrawal Broadcast

This will be sent when a withdrawal from one of the wallets on your Custody instance has been broadcast.

#### Request details

A request will be made to the configured URL with a content type of application/json and a body containing the ID of the transaction.

```
{
  "type": "withdrawal",
  "transaction_id": 123
}
```

## Withdrawal Confirmed

This will be sent when a withdrawal from one of the wallets on your Custody instance has received at least one confirmation on the blockchain.

#### Request details

A request will be made to the configured URL with a content type of application/json and a body containing the ID of the transaction.

```
{
  "type": "withdrawal_confirmed",
  "transaction_id": 123
}
```

## Transaction Status Changed

This will be sent when a transaction from one of the wallets on your Custody instance has changed its status.

#### Request details

A request will be made to the configured URL with a content type of application/json and a body containing the ID of the transaction, and the associated wallet IDs.

```
{
  "type": "transaction_status",
  "transaction_id": 123,
  "associated_wallet_ids": {
    "source_wallet_id": 101,
    "destination_wallet_id": 102
  }
}
```

## Direct Party Approved

This will be sent when a direct party entity submitted to Balance for review has been approved by Balance's compliance department.

#### Request details

A request will be made to the configured URL with a content type of application/json and a body containing the ID of the entity.

```
{
  "type": "direct_party_approved",
  "id": 123
}
```

## Direct Party Rejected

This will be sent when a direct party entity submitted to Balance for review has been rejected by Balance's compliance department.

#### Request details

A request will be made to the configured URL with a content type of application/json and a body containing the ID of the entity.

```
{
  "type": "direct_party_rejected",
  "id": 123
}
```

Rejection reasons can be retrieved by calling [`GET /api/v1/direct_parties/:id`](/balance-custody-api/v1/direct-parties.md#get-api-v1-direct_parties) (see `rejection_reason` field).
