Skip to main content

Webhooks

Webhooks push events to your systems as they happen, instead of polling the API. They are included in the Premium and Professional plans.

Register an endpoint​

In Settings → Webhooks (administrators), add the HTTPS address of your endpoint and choose its events. SecUp generates a signing secret for it (it starts with whsec_ and is shown only once); copy it into your receiver. A workspace can have up to 10 webhooks. Use Send test to check your endpoint.

Endpoints must be reachable on the internet: private and local addresses are refused.

SecUp posts signed JSON events to your endpoint, which verifies the signature and forwards them to ticketing, chat or SIEM tools

SecUp signs every event; your endpoint verifies it before passing it on.

Events​

EventSent when
scan.createdA scan is queued (manual, API or scheduled).
scan.updatedA scan changes state: running, finished, failed, stopped.
risk.createdA scan finds a new risk.
risk.updatedA risk changes status: closed by a scan, reopened, accepted, marked as false positive.

Request​

SecUp sends a POST with a JSON body:

{
"id": "4a7f0b6e-0e4c-4a3b-9a59-2f6f2b9e3c11",
"event": "scan.updated",
"created_at": "2026-12-01T08:15:02.391Z",
"data": { "id": "…", "state": "SUCCEEDED", "…": "…" }
}

data holds the scan or the risk:

Event familydata fields
scan.*id, name, state (QUEUED, RUNNING, STOPPING, STOPPED, SUCCEEDED, FAILED, OVER_LIMIT), progress, scan_types, target_ids, risks_summary, started_at, finished_at, created_at
risk.*id, target_id, title, severity, status, scan_type, location, parameter, cve_ids, first_seen_at, last_seen_at, closed_at

and these headers:

HeaderContent
X-SecUp-EventThe event name.
X-SecUp-DeliveryThe unique id of this delivery: use it to ignore duplicates.
X-SecUp-Signaturesha256= followed by the HMAC-SHA256 of the raw body with your signing secret, in hexadecimal.
User-AgentSecUp-Webhooks/1.0

Answer with any 2xx status within 10 seconds. Redirects are not followed. The last status and error of each endpoint are shown in Settings → Webhooks.

Verify the signature​

Always check the signature on the raw body, before parsing it, with a constant-time comparison.

Node.js (Express)

const crypto = require('crypto');
const express = require('express');
const app = express();

app.post('/secup-webhook', express.raw({ type: 'application/json' }), (req, res) => {
const expected = 'sha256=' + crypto.createHmac('sha256', process.env.SECUP_WEBHOOK_SECRET).update(req.body).digest('hex');
const got = req.get('X-SecUp-Signature') || '';
if (got.length !== expected.length || !crypto.timingSafeEqual(Buffer.from(got), Buffer.from(expected))) {
return res.status(401).end();
}
const event = JSON.parse(req.body);
console.log(event.event, event.data.id);
res.status(204).end();
});

Python (Flask)

import hashlib, hmac, os
from flask import Flask, request, abort

app = Flask(__name__)

@app.post("/secup-webhook")
def secup_webhook():
body = request.get_data()
expected = "sha256=" + hmac.new(os.environ["SECUP_WEBHOOK_SECRET"].encode(), body, hashlib.sha256).hexdigest()
if not hmac.compare_digest(request.headers.get("X-SecUp-Signature", ""), expected):
abort(401)
event = request.get_json()
print(event["event"], event["data"]["id"])
return "", 204