PATCH
/
webhooks
/
{webhook_id}
curl --request PATCH \
  --url https://api.chainbase.online/v1/webhooks/{webhook_id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '{
  "webhook_name": "<string>",
  "webhook_url": "<string>",
  "filters": [
    {
      "field": "<string>",
      "values": [
        "<string>"
      ]
    }
  ],
  "additional_headers": [
    {
      "name": "<string>",
      "value": "<string>"
    }
  ],
  "webhook_id": "<string>"
}'
"{\"code\":0,\"msg\":\"success\",\"data\":{\"webhook_id\":\"235418e9-eb46-4d88-9012-64b76c63bf0c\",\"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-18T10:40:35.203691Z\",\"updated_at\":\"2023-08-23T03:04:22.854101Z\",\"status\":1}}"

Headers

x-api-key
string
required

YOUR-API-KEY

Path Parameters

webhook_id
string
required

Webhook to be updated

Body

application/json
webhook_name
string

Name of the webhook

webhook_url
string

URL of the webhook

filters
object[]

Filter object to filter message

additional_headers
object[]

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

webhook_id
string
required

The ID of Webhook to be updated

Response

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