Skip to main content

Overview

Send data to HTTP endpoints as JSON payloads.

Configuration

sinks:
  my_webhook_sink:
    type: webhook
    from: my_transform
    url: https://api.example.com/endpoint
    one_row_per_request: true | false

Parameters

type
string
required
Must be webhook
from
string
required
The transform or source to read data from
url
string
required
The HTTP endpoint URL to send data to
one_row_per_request
boolean
default:"false"
If true, sends each row individually. If false, sends batches of rows.

Request Format

Data is sent as JSON: Single row (one_row_per_request: true):
{
  "id": "abc123",
  "address": "0x...",
  "value": "1000000",
  "timestamp": "2024-01-01T00:00:00Z"
}
Batch (one_row_per_request: false):
[
  {
    "id": "abc123",
    "address": "0x...",
    "value": "1000000"
  },
  {
    "id": "def456",
    "address": "0x...",
    "value": "2000000"
  }
]

Example: Send High-Value Transfers to API

transforms:
  high_value_transfers:
    type: sql
    primary_key: id
    sql: |
      SELECT *
      FROM erc20_transfers
      WHERE CAST(value AS DECIMAL) > 1000000000000000000000

sinks:
  webhook_alerts:
    type: webhook
    from: high_value_transfers
    url: https://alerts.example.com/high-value-transfer
    one_row_per_request: true
The webhook sink includes retry logic with exponential backoff for transient failures. Configure timeouts on your endpoint accordingly.