Custom Webhook

Learn how to configure your own webhook to receive notifications.

Send notifications as POST requests to a custom webhook endpoint you define. This provides the most flexibility for handling notifications within your own application or integrating with third-party services.

Configuration:

  1. Channel: Set the channel field to "WEBHOOK".

  2. Delivery Location: Provide the full URL of your webhook endpoint in the delivery_location field.

Example Payload:

{
  "channel": "WEBHOOK",
  "delivery_location": "https://your-app.com/webhook-endpoint"
}

Webhook Payloads (Sent by Nodefy):

Nodefy will send a POST request to your webhook endpoint with a JSON payload containing the details of the triggered event.

Example address_activity payload:

{
  "webhookId": "wh_123abc",  // The ID of the triggered webhook
  "external_user_id": "user123",  // The ID of the user to notify
  "createdAt": "2024-01-01T12:00:00Z",
  "type": "ADDRESS_ACTIVITY", 
  "event": {
    "network": "ETH_MAINNET",
    "activity": [
      {
        "hash": "0x987...xyz",
        "fromAddress": "0x678...ghi",
        "toAddress": "0x123...abc", 
        "asset": "ETH",
        "value": "0.5",
        "category": "external",
        "blockNum": "17000000"
      }
    ]
  }
}

Example graphql payload:

The exact payload structure for GraphQL events will depend on your specific GraphQL query. Here's an example for a simple ERC-20 Transfer event query:

{
  "webhookId": "wh_456def",  // The ID of the triggered webhook
  "external_user_id": "user123", 
  "createdAt": "2024-01-02T15:30:00Z",
  "type": "GRAPHQL",
  "event": {
    "data": {
      "block": {
        "logs": [
          {
            "transaction": {
              "hash": "0x...", 
              "from": {
                "address": "0x..."  // Address of the sender
              },
              "to": {
                "address": "0x..." // Address of the receiver
              },
            },
            "topics": ["0xddf252...", "0x...", "0x..."], 
            "data": "0x..."
          }
        ]
      }
    }
  }
}

Last updated