Tutorial · Webhooks · Pro
Get notified when a case is resolved
Close the loop in your ticket system the moment a phishing site is taken down.
1Add the webhook
In Company dashboard → Developers → Webhooks, add a Custom webhook pointing to your endpoint with a secret token in the path, for example https://hooks.yourcompany.com/fraudpol/8f3c…. Keep Case updates switched on.
2Receive and verify
Deliveries are not signed yet, so treat the payload as a hint and confirm with the API before changing anything.
app.post("/fraudpol/:token", express.json(), async (req, res) => {
if (req.params.token !== process.env.HOOK_TOKEN) return res.sendStatus(404);
res.sendStatus(204); // answer fast, work afterwards
const e = req.body;
if (e.event_type !== "report.status_changed") return;
// Confirm through the API (list filtered by status, or GET /v1/reports/<id>)
const r = await fetch(`https://ugapgzpffrykyglevlhz.supabase.co/functions/v1/blackwall-api/v1/reports?case_status=${e.case_status}&limit=200`,
{ headers: { "X-API-Key": process.env.FP_COMPANY_KEY } });
const { reports } = await r.json();
const c = reports.find((x) => x.report_ref === e.report_ref);
if (c) await tickets.update(c.report_ref, { status: c.case_status_label, note: c.resolution_note });
});3Map the statuses
in_progress: providers have been contacted.resolved_taken_down: the site is offline; close the ticket.resolved_no_threat: no action needed;resolution_notesays why.
