Search by name, SuiNS, address, digest, object ID, coin type or checkpoint.

API

webhooks.create

Create a webhook that POSTs matching transactions to your URL.

Details

Endpoint
POST /v0/webhooks
Credits
10
Rate class
Light. Counts against your light requests per second.

Creates a webhook for account addresses and transaction types, with coinTypes, eventTypes, packages, objectIds and balanceAddresses filters. Filters of different kinds combine with AND, entries inside one list with OR; transactions that match an objectIds, packages or balanceAddresses filter carry a matched field saying what matched. The response carries a signing secret that is shown once: verify the tide-signature header (t=<unix>,v1=<hex HMAC-SHA256(secret, t + '.' + body)>). Each POST holds up to 100 transactions of one checkpoint; tide-delivery-id is stable across retries so you can dedupe. Retries run for 24 hours. Costs 10 credits to create, 1 per delivered transaction.

Parameters

NameTypeDescription
webhookURLrequiredstringPublic https URL that receives POSTs. Private and loopback addresses are refused.
webhookTypestringenhanced = parsed transactions (default), raw = balance changes, events and object changes, discord = one sentence and a tide.ad link per transaction.One of "enhanced", "raw", "discord".
accountAddressesarray of stringMatch transactions that touch any of these addresses. Up to your plan's limit.
transactionTypesarray of stringOnly these transaction types (SWAP, TRANSFER, ...). Omit or use ANY for all.
txnStatusstringDefault all.One of "all", "success", "failed".
authHeaderstringSent back to you as the Authorization header on every POST.
coinTypesarray of stringCoin types with a balance change.
eventTypesarray of stringMove event types: a full type with or without type parameters, a module prefix (0xpackage::module) or a package prefix (0xpackage). Up to 100 entries on Free, 1,000 on paid plans.
packagesarray of stringMatch transactions whose PTB called these packages: 0xpackage, 0xpackage::module or 0xpackage::module::function. Any version of the package matches, so pass the original id and upgrades are covered. Up to 100 entries on Free, 1,000 on paid plans.
objectIdsarray of stringMatch any change to these object ids: created, mutated, deleted, wrapped or unwrapped. Each delivered transaction carries matched.objects with the new version and kind. Up to 100 entries on Free, 1,000 on paid plans.
balanceAddressesarray of stringMatch a balance change of these addresses, narrowed by coinTypes when given. Each delivered transaction carries matched.balances with the signed delta in the coin's smallest unit. Up to 100 entries on Free, 1,000 on paid plans.

Request

Send your key in the x-api-key header, or leave it out to use the keyless tier.

curl
curl -X POST "https://api.tide.ad/v0/webhooks" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "webhookURL": "https://example.com/tide-webhook",
  "webhookType": "raw",
  "coinTypes": [
    "0x2::sui::SUI"
  ]
}'
TypeScript
const res = await fetch("https://api.tide.ad/v0/webhooks", {
  method: "POST",
  headers: {
    "x-api-key": process.env.TIDE_API_KEY!,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "webhookURL": "https://example.com/tide-webhook",
    "webhookType": "raw",
    "coinTypes": [
      "0x2::sui::SUI"
    ]
  }),
});
const data = await res.json();

Response

No example response is available for this method yet.