POST
/
webhooks
curl --request POST \
  --url https://api.chainbase.online/v1/webhooks \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '{
  "webhook_name": "<string>",
  "webhook_url": "<string>",
  "data_source": "<string>",
  "filters": [
    {
      "field": "<string>",
      "values": []
    }
  ],
  "additional_headers": [
    {
      "name": "<string>",
      "value": "<string>"
    }
  ]
}'
"{\"code\":0,\"msg\":\"create job success\",\"data\":{\"webhook_id\":\"460009d1-f7ce-43a9-9747-681054ffb462\",\"filters\":[{\"field\":\"contract_address\",\"values\":[\"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\",\"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599\",\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\"0xdAC17F958D2ee523a2206206994597C13D831ec7\"]}],\"webhook_name\":\"massive-erc20-transfer\",\"webhook_url\":\"https://gtsfh5g3c4.hk.aircode.run/erc20transfer\",\"data_source\":\"ethereum_erc20_transfer\",\"additional_headers\":[{\"name\":\"Authorization\",\"value\":\"Bearer xyz\"}],\"created_at\":\"2023-08-23T03:27:28.281175Z\",\"updated_at\":\"2023-08-23T03:27:28.281175Z\",\"status\":0}}"

Headers

x-api-key
string
required

YOUR-API-KEY

Body

application/json
webhook_name
string
required

Name of the webhook

webhook_url
string
required

URL of the webhook

data_source
string
required

Data source the webhook subscribe to

filters
object[]

Filter Object

additional_headers
object[]

Additional headers would be added into the webhook POST when push message is matched.

Response

200
application/json
200
code
integer
default:
0
msg
string
data
object