Webhook reference

JSON reference for Dispatch webhook payloads

When a webhook Patch is fired, Dispatch sends an HTTP POST message to your webhook endpoint URL.

The message (payload) is a JSON object with information about the Trigger event.

Here are the JSON structures for each Trigger type.

Smart Contract Activity Trigger

Aka "Event monitor" — a trigger that fires when your selected smart contract events are emitted or functions are called.

{
  "details": {
    "block_explorer_block_link": "https://etherscan.io/block/18479837",
    "block_explorer_contract_link": "https://etherscan.io/address/0xd774557b647330C91Bf44cfEAB205095f7E6c367",
    "block_explorer_name": "Etherscan",
    "block_explorer_tx_link": "https://etherscan.io/tx/0x4aea2871a593877974eeff77529b937666d7410a118cbf1a2dd41042e613c01d",
    "block_number": 18479837,
    "contract_address": "0xd774557b647330C91Bf44cfEAB205095f7E6c367",
    "contract_name": "Nakamigos",
    "network": "Ethereum",
    "patch_event_id": "772977e6-f3d0-4916-bb78-6bc4460ee880",
    "patch_event_link": "https://dispatch.esprezzo.io/patches/history/772977e6-f3d0-4916-bb78-6bc4460ee880",
    "patch_id": "22594135-b546-415c-bce4-c43c370e4f0c",
    "patch_name": "Send a JSON payload to a webhook endpoint when Transfer event is emitted by Nakamigos",
    "signature": "Transfer(address,address,uint256)",
    "signature_display": "Transfer(address indexed from, address indexed to, uint256 indexed tokenId)",
    "signature_name": "Transfer",
    "signature_type": "event",
    "timestamp": "1 Nov, 2023 9:07 PM +UTC",
    "tx_hash": "0x4aea2871a593877974eeff77529b937666d7410a118cbf1a2dd41042e613c01d",
    "username": "test1",
    "values": [
      {
        "name": "from",
        "type": "address",
        "value": "0xd8Ac2855F5079671d4C0970c6FA16531eeA3907c"
      },
      {
        "name": "to",
        "type": "address",
        "value": "0x9698024d6Be6807482ec5d582CD73D2f469F5b5C"
      },
      {
        "name": "tokenid",
        "type": "uint",
        "value": "19397"
      }
    ]
  },
  "patch": {
    "action": {
      "deleted_at": null,
      "description": "Send a JSON payload to a webhook endpoint",
      "icon_url": "https://content.esprezzo.io/dispatch/icons/actions/webhook.svg",
      "id": "a422b06d-5904-4d19-95cc-92e8c6f57edd",
      "inserted_at": "2022-08-26T15:29:55Z",
      "name": "Webhook",
      "slug": "webhook",
      "updated_at": "2022-08-26T15:29:55Z"
    },
    "action_count": 0,
    "deleted_at": null,
    "error_count": 0,
    "id": "22594135-b546-415c-bce4-c43c370e4f0c",
    "inserted_at": "2023-11-01T20:32:20Z",
    "is_active": true,
    "name": "Send a JSON payload to a webhook endpoint when Transfer event is emitted by Nakamigos",
    "settings": [
      {
        "id": "41caa2ec-35dc-4aa7-8e13-4eac57d6bd60",
        "inserted_at": "2023-11-01T20:32:20Z",
        "integration_channel_id": null,
        "integration_id": null,
        "patch_id": "22594135-b546-415c-bce4-c43c370e4f0c",
        "setting": {
          "description": "A comma-separated list of implementation event signatures to listen to in order to receive smart contract events.",
          "id": "a2a32f3a-06c0-4f20-8842-d85cd2192c59",
          "inserted_at": "2023-04-04T14:14:03Z",
          "slug": "implementation-event-list",
          "type": "trigger",
          "updated_at": "2023-04-04T14:14:03Z"
        },
        "setting_id": "a2a32f3a-06c0-4f20-8842-d85cd2192c59",
        "updated_at": "2023-11-01T20:32:20Z",
        "value": "Transfer(address indexed from, address indexed to, uint256 indexed tokenId)"
      },
      {
        "id": "24791c6c-0b93-4a7e-80a7-86d93afdca53",
        "inserted_at": "2023-11-01T20:32:20Z",
        "integration_channel_id": "https://webhook.site/842f0c2a-6749-432c-ac8f-d24366059ed9",
        "integration_id": "217a5e9f-1405-4a6b-ac0a-fbf0c0c4c7e0",
        "patch_id": "22594135-b546-415c-bce4-c43c370e4f0c",
        "setting": {
          "description": "The channel to dispatch Telegram messages to.",
          "id": "8d7dfc6d-b443-4860-8a06-5c534935d289",
          "inserted_at": "2022-07-11T14:05:16Z",
          "slug": "integration",
          "type": "action",
          "updated_at": "2022-07-11T14:05:16Z"
        },
        "setting_id": "8d7dfc6d-b443-4860-8a06-5c534935d289",
        "updated_at": "2023-11-01T20:32:20Z",
        "value": "My Cool Webhook"
      }
    ],
    "trigger": {
      "deleted_at": null,
      "description": "When specific functions are called and/or events are emitted",
      "icon_url": "https://content.esprezzo.io/dispatch/icons/triggers/smart-contract-activity.svg",
      "id": "588cbfa7-24fa-4aa7-8e0e-73830b4443b6",
      "inserted_at": "2023-03-02T18:02:36Z",
      "name": "Smart contract activity",
      "slug": "smart-contract-activity",
      "type": "user-contract",
      "updated_at": "2023-03-02T18:02:36Z"
    },
    "updated_at": "2023-11-01T20:32:20Z"
  }
}

Balance Change Trigger

{
  "details": {
    "above_or_below": null,
    "address": "0xb5d85CBf7cB3EE0D56b3bB207D5Fc4B82f43F511",
    "block_explorer_address_link": "https://etherscan.io/address/0xb5d85CBf7cB3EE0D56b3bB207D5Fc4B82f43F511",
    "change_amount": "-0.115130931858",
    "network": "Ethereum",
    "new_balance": "1,210.534698218538",
    "patch_name": "Send a JSON payload to a webhook endpoint when ETH balance changes (0xb5d8...F511)",
    "previous_balance": "1,210.649829150396",
    "threshold_amount": null,
    "timestamp": "13 Feb, 2023 6:23 PM +UTC",
    "token_name": "Ether",
    "token_symbol": "ETH",
    "truncated_address": "0xb5d8...F511"
  },
  "patch": {
    "action": {
      "deleted_at": null,
      "description": "Send a JSON payload to a webhook endpoint",
      "icon_url": "https://content.esprezzo.io/dispatch/icons/actions/webhook.svg",
      "id": "a422b06d-5904-4d19-95cc-92e8c6f57edd",
      "inserted_at": "2022-08-26T15:29:55Z",
      "name": "Webhook",
      "slug": "webhook",
      "updated_at": "2022-08-26T15:29:55Z"
    },
    "action_count": 14,
    "deleted_at": null,
    "error_count": 0,
    "id": "7bb1c092-a68a-42a0-b147-63ea9e1dc277",
    "inserted_at": "2023-02-02T19:49:54Z",
    "is_active": true,
    "name": "Send a JSON payload to a webhook endpoint when ETH balance changes (0xb5d8...F511)",
    "settings": [
      {
        "id": "d4da2972-4ba4-4461-a248-90a0ac4f6fc5",
        "inserted_at": "2023-02-02T19:49:54Z",
        "integration_channel_id": null,
        "integration_id": null,
        "patch_id": "7bb1c092-a68a-42a0-b147-63ea9e1dc277",
        "setting": {
          "description": "A comma-separated list of account addresses to listen to in order to receive account balance changes.",
          "id": "cd1aac20-e2d1-4a23-baf6-0da78635e2bc",
          "inserted_at": "2022-07-11T14:05:18Z",
          "slug": "address-list",
          "type": "trigger",
          "updated_at": "2022-07-11T14:05:18Z"
        },
        "setting_id": "cd1aac20-e2d1-4a23-baf6-0da78635e2bc",
        "updated_at": "2023-02-02T19:49:54Z",
        "value": "0xb5d85CBf7cB3EE0D56b3bB207D5Fc4B82f43F511"
      },
      {
        "id": "447c827e-68b9-4f0a-a662-1fbab0a2a899",
        "inserted_at": "2023-02-02T19:49:54Z",
        "integration_channel_id": "https://webhook.site/842f0c2a-6749-432c-ac8f-d24366059ed9",
        "integration_id": "217a5e9f-1405-4a6b-ac0a-fbf0c0c4c7e0",
        "patch_id": "7bb1c092-a68a-42a0-b147-63ea9e1dc277",
        "setting": {
          "description": "The channel to dispatch Telegram messages to.",
          "id": "8d7dfc6d-b443-4860-8a06-5c534935d289",
          "inserted_at": "2022-07-11T14:05:16Z",
          "slug": "integration",
          "type": "action",
          "updated_at": "2022-07-11T14:05:16Z"
        },
        "setting_id": "8d7dfc6d-b443-4860-8a06-5c534935d289",
        "updated_at": "2023-02-02T19:49:54Z",
        "value": "My Cool webhook"
      }
    ],
    "trigger": {
      "deleted_at": null,
      "description": "When the balance of a specific asset in a wallet or smart contract changes",
      "icon_url": "https://content.esprezzo.io/dispatch/icons/triggers/address-balance-change.svg",
      "id": "a858081d-9f46-46f4-8617-e27f6ae1a123",
      "inserted_at": "2022-07-11T14:05:17Z",
      "name": "Address balance change",
      "slug": "address-balance-change",
      "type": "balance-change",
      "updated_at": "2022-07-11T14:05:17Z"
    },
    "updated_at": "2023-02-13T18:17:26Z"
  }
}

Balance Threshold Reached Trigger

{
  "details": {
    "above_or_below": "below",
    "address": "0xb5d85CBf7cB3EE0D56b3bB207D5Fc4B82f43F511",
    "block_explorer_address_link": "https://etherscan.io/address/0xb5d85CBf7cB3EE0D56b3bB207D5Fc4B82f43F511",
    "change_amount": "-2.250671200561",
    "network": "Ethereum",
    "new_balance": "1,188.834730915411",
    "patch_name": "Send a JSON payload to a webhook endpoint when ETH balance < 1,191 (0xb5d8...F511)",
    "previous_balance": "1,191.085402115972",
    "threshold_amount": "1,191.00",
    "timestamp": "13 Feb, 2023 7:55 PM +UTC",
    "token_name": "Ether",
    "token_symbol": "ETH",
    "truncated_address": "0xb5d8...F511"
  },
  "patch": {
    "action": {
      "deleted_at": null,
      "description": "Send a JSON payload to a webhook endpoint",
      "icon_url": "https://content.esprezzo.io/dispatch/icons/actions/webhook.svg",
      "id": "a422b06d-5904-4d19-95cc-92e8c6f57edd",
      "inserted_at": "2022-08-26T15:29:55Z",
      "name": "Webhook",
      "slug": "webhook",
      "updated_at": "2022-08-26T15:29:55Z"
    },
    "action_count": 0,
    "deleted_at": null,
    "error_count": 0,
    "id": "687a6c3e-7de4-45a5-a221-38f292e0c066",
    "inserted_at": "2023-02-13T19:41:01Z",
    "is_active": true,
    "name": "Send a JSON payload to a webhook endpoint when ETH balance < 1,191 (0xb5d8...F511)",
    "settings": [
      {
        "id": "550e208d-6a75-4a83-8f72-287fea0b9742",
        "inserted_at": "2023-02-13T19:41:01Z",
        "integration_channel_id": "https://webhook.site/842f0c2a-6749-432c-ac8f-d24366059ed9",
        "integration_id": "217a5e9f-1405-4a6b-ac0a-fbf0c0c4c7e0",
        "patch_id": "687a6c3e-7de4-45a5-a221-38f292e0c066",
        "setting": {
          "description": "The channel to dispatch Telegram messages to.",
          "id": "8d7dfc6d-b443-4860-8a06-5c534935d289",
          "inserted_at": "2022-07-11T14:05:16Z",
          "slug": "integration",
          "type": "action",
          "updated_at": "2022-07-11T14:05:16Z"
        },
        "setting_id": "8d7dfc6d-b443-4860-8a06-5c534935d289",
        "updated_at": "2023-02-13T19:41:01Z",
        "value": "My Cool Webhook"
      },
      {
        "id": "799766da-0170-424a-a20e-653d95894875",
        "inserted_at": "2023-02-13T19:41:01Z",
        "integration_channel_id": null,
        "integration_id": null,
        "patch_id": "687a6c3e-7de4-45a5-a221-38f292e0c066",
        "setting": {
          "description": "A lower limit for when the comparison of the previous and new balance crosses this threshold.",
          "id": "d8e48b57-5d44-4b9a-8851-18ac78748d72",
          "inserted_at": "2022-07-11T14:05:18Z",
          "slug": "below-threshold",
          "type": "trigger",
          "updated_at": "2022-07-11T14:05:18Z"
        },
        "setting_id": "d8e48b57-5d44-4b9a-8851-18ac78748d72",
        "updated_at": "2023-02-13T19:41:01Z",
        "value": "1191"
      },
      {
        "id": "e264e7d7-d292-4518-840e-227ef3d21a1a",
        "inserted_at": "2023-02-13T19:41:01Z",
        "integration_channel_id": null,
        "integration_id": null,
        "patch_id": "687a6c3e-7de4-45a5-a221-38f292e0c066",
        "setting": {
          "description": "A comma-separated list of account addresses to listen to in order to receive account balance changes.",
          "id": "cd1aac20-e2d1-4a23-baf6-0da78635e2bc",
          "inserted_at": "2022-07-11T14:05:18Z",
          "slug": "address-list",
          "type": "trigger",
          "updated_at": "2022-07-11T14:05:18Z"
        },
        "setting_id": "cd1aac20-e2d1-4a23-baf6-0da78635e2bc",
        "updated_at": "2023-02-13T19:41:01Z",
        "value": "0xb5d85CBf7cB3EE0D56b3bB207D5Fc4B82f43F511"
      }
    ],
    "trigger": {
      "deleted_at": null,
      "description": "When the balance of an token goes above or below a threshold for one address",
      "icon_url": "https://content.esprezzo.io/dispatch/icons/triggers/balance-threshold-reached.svg",
      "id": "c17e8157-3125-4b68-99d4-c3df6b18cf61",
      "inserted_at": "2022-07-11T14:05:17Z",
      "name": "Balance threshold reached",
      "slug": "balance-threshold-reached",
      "type": "balance-change",
      "updated_at": "2022-07-11T14:05:17Z"
    },
    "updated_at": "2023-02-13T19:41:01Z"
  }
}

Last updated