← NorthField Docs

Webhooks

Subscribe to platform events and receive HTTPS POST callbacks in near real-time.

Events

Payload example

{
  "id": "evt_01JX8KQ3",
  "type": "deployment.ready",
  "created": 1783000000,
  "data": { "deployment_id": "dep_9xk2", "url": "https://app.nf.run" }
}

Verifying signatures

Every request includes an X-NF-Signature header: t=timestamp,v1=hmac. Compute an HMAC-SHA256 of t + "." + raw_body with your signing secret and compare using constant-time comparison.

import crypto from "crypto";
const [t, v1] = header.replace("t=", "").split(",v1=");
const sig = crypto.createHmac("sha256", secret)
  .update(`${t}.${rawBody}`).digest("hex");
const valid = crypto.timingSafeEqual(
  Buffer.from(sig), Buffer.from(v1));

Retries

Failed deliveries retry with exponential backoff for up to 24 hours: 30s, 5m, 30m, 2h, 8h. Return any 2xx to acknowledge.