Skip to Content
TrackCrest Docs

Webhooks

Get told about changes instead of polling.

Subscribe a URL with POST /webhooks under your API: network, affiliate or advertiser. The response includes a signing secret, shown once.

Events

Each event is a POST to your URL:

{ "id": "…", "type": "conversion.created", "createdAt": "2026-11-01T12:00:00Z", "data": { … } }

data has the same shape as the matching GET endpoint. The event types you can subscribe to are listed on each create endpoint.

Answering

Reply with any 2xx within 10 seconds. Anything else is retried after 1 and 5 minutes, then 15 minutes, 1, 3, 6 and 12 hours. The same event can arrive more than once, so use id to skip repeats.

Send yourself a webhook.test event with the test endpoint, and see recent deliveries and their answers with the deliveries endpoint.

Verifying the signature

Every delivery has X-Signature: t=…,v1=…. Check it with your secret before trusting the body:

import crypto from "node:crypto";

function verify(header, rawBody, secret) {
  const [t, v1] = header.split(",").map((p) => p.split("=")[1]);
  const expected = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 300;
  return fresh && crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(v1));
}

Use the raw request body exactly as received, not re-serialised JSON.

On this page