# Webhooks

#### Suspicious Transaction notification <a href="#suspicious-transaction-notification" id="suspicious-transaction-notification"></a>

The Suspicious Transaction notification is triggered when a transaction involving a watchlist address is identified as potentially risky. The notification provides details of the transaction, including the transaction URL, the protected address name, and the hash of the transaction. It also provides information about the potential risks associated with the transaction, including the types of risks involved and the severity level. The notification is designed to alert users of potential risks associated with transactions involving their watchlist addresses.

```json
{
  "notificationType": "suspiciousTransaction",
  "data": {
    "txUrl": "https://etherscan.io/tx/0x0",
    "aegisUrl": "https://aegis.lossless.io/dashboard/address-details/0x388C818CA8B9251b393131C08a736A67ccB19297/eth",
    "protectedAddressName": "Test Protected Address",
    "txHash": "0x0",
    "protectedAddress": "0x388C818CA8B9251b393131C08a736A67ccB19297",
    "chain": "eth",
    "riskTypes": ["Reentrancy", "OFAC Compliance", "Tornado User Involved"],
    "severityLevel": "Medium"
  }
}
```

#### Custom Events notification <a href="#custom-events-notification" id="custom-events-notification"></a>

Notification about a transaction where a monitored smart contract event occurred. The notification includes the URL to view the transaction, the name of the protected address associated with the event, the hash of the transaction, the chain the transaction occurred on, and the list of custom events that were detected in the transaction.

```json
{
  "notificationType": "customEventsDetected",
  "data": {
    "txUrl": "https://etherscan.io/tx/0x0",
    "aegisUrl": "https://aegis.lossless.io/dashboard/address-details/0x388C818CA8B9251b393131C08a736A67ccB19297/eth",
    "protectedAddressName": "Test Protected Address",
    "txHash": "0x0",
    "protectedAddress": "0x388C818CA8B9251b393131C08a736A67ccB19297",
    "chain": "eth",
    "customEvents": ["Withdrawal", "Deposit"]
  }
}
```

**Function Calls notification**

Notification about detected function calls in a transaction involving a protected address added to a user's watchlist. This notification provides details on the function calls, including the function name, function signature, and the originating address.

```json
{
  "notificationType": "functionCallsDetected",
  "data": {
    "txUrl": "https://etherscan.io/tx/0x0",
    "aegisUrl": "https://aegis.lossless.io/dashboard/address-details/0x388C818CA8B9251b393131C08a736A67ccB19297/eth",
    "protectedAddressName": "Test Protected Address",
    "txHash": "0x0",
    "protectedAddress": "0x388C818CA8B9251b393131C08a736A67ccB19297",
    "chain": "eth",
    "functionCalls": [
      {
        "functionName": "transfer",
        "functionSignature": "0xa9059cbb",
        "from": "0x388C818CA8B9251b393131C08a736A67ccB19297"
      },
      {
        "functionSignature": "0xa246e7a8",
        "fucntionName": "testFunction",
        "from": "lockAllFundTransferFunctions"
      }
    ]
  }
}
```

#### Mint notification <a href="#mint-notification" id="mint-notification"></a>

The Mint Detected notification is sent when a watchlist address has minted new tokens. This notification includes details about the mint transaction, such as the transaction hash, the protected address, and the chain. Additionally, the notification provides details about the amount and recipients of the newly minted tokens. This notification is useful for users who want to be notified when a specific token in their watchlist is minted, allowing them to stay informed about changes to their monitored tokens.

```json
{
  "notificationType": "mintDetected",
  "data": {
    "txUrl": "https://etherscan.io/tx/0x0",
    "aegisUrl": "https://aegis.lossless.io/dashboard/address-details/0x388C818CA8B9251b393131C08a736A67ccB19297/eth",
    "protectedAddressName": "Test Protected Address",
    "txHash": "0x0",
    "protectedAddress": "0x388C818CA8B9251b393131C08a736A67ccB19297",
    "chain": "ethereum",
    "mintDetails": [
      {
        "amount": 1000000000000000000,
        "to": "0x388C818CA8B9251b393131C08a736A67ccB19297"
      },
      {
        "amount": 59999,
        "to": "0x388C818CA8B9251b393131C08a736A67ccB19297"
      },
      {
        "amount": 3829832,
        "to": "0x388C818CA8B9251b393131C08a736A67ccB19297"
      }
    ]
  }
}
```

#### TVL changed notification <a href="#tvl-changed-notification" id="tvl-changed-notification"></a>

This notification is for tracking changes in Total Value Locked (TVL) for a specific token within a user's watchlist. Users can set a percentage threshold for the change in their balance and receive a notification once the threshold is met. The notification payload includes the protected address, the chain, the token name, and the percentage change in the TVL.

```json
{
  "notificationType": "tvlChanged",
  "data": {
    "aegisUrl": "https://aegis.lossless.io/dashboard/address-details/0x388C818CA8B9251b393131C08a736A67ccB19297/eth",
    "protectedAddressName": "Test Protected Address",
    "protectedAddress": "0x388C818CA8B9251b393131C08a736A67ccB19297",
    "chain": "ethereum",
    "tokenName": "DAI",
    "percentageChange": 10
  }
}

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lossless.io/aegis/add-a-notification-channel/webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
