Reference
Send the audit log to your own system
A workspace can send each entry of its audit log to an https address of its own, as it is written. It is part of the Starter, Team and Business plans. An admin sets it up under Settings, Audit webhook, and gets a signing secret that is shown once.
What arrives
One POST for each entry, in the order they were written, with a JSON body:
{
"id": 4821,
"type": "audit.entry",
"workspace": "acme",
"at": "2026-11-25T14:03:11.220Z",
"actor": { "type": "user", "id": "usr_...", "label": "Sam Ortiz" },
"action": "shield.policy.publish",
"target": { "type": "policy", "id": "pv_..." },
"summary": "Published version 7 of the prod policy in enforce mode",
"ip": "203.0.113.9",
"meta": {}
}Answer with any 2xx status to accept an entry. Entries are sent within about a minute of being written. The headers are X-Verg-Event (audit.entry, or test for a test event), X-Verg-Delivery, X-Verg-Timestamp (seconds since 1970) and X-Verg-Signature.
Check the signature
The signature is sha256= followed by the HMAC-SHA256, in lower case hex, of the timestamp, a dot and the raw body, keyed with your signing secret. Compute it over the body exactly as received, compare in constant time, and refuse a timestamp more than five minutes old.
import { createHmac, timingSafeEqual } from 'node:crypto';
// rawBody: the request body exactly as received (a string or Buffer), before any JSON parsing.
export function verify(secret, headers, rawBody) {
const timestamp = headers['x-verg-timestamp'];
if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false; // refuse an old delivery
const want = Buffer.from('sha256=' + createHmac('sha256', secret).update(timestamp + '.' + rawBody).digest('hex'));
const got = Buffer.from(String(headers['x-verg-signature'] || ''));
return want.length === got.length && timingSafeEqual(want, got);
}import hmac, hashlib, time
def verify(secret: str, headers: dict, raw_body: bytes) -> bool:
ts = headers.get("X-Verg-Timestamp", "")
if not ts.isdigit() or abs(time.time() - int(ts)) > 300:
return False
mac = hmac.new(secret.encode(), ts.encode() + b"." + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest("sha256=" + mac, headers.get("X-Verg-Signature", ""))Where it goes
The address must be https on a public name or address. The console resolves it, refuses any private or reserved address, connects to the address it checked, follows no redirect and waits 5 seconds for an answer. The secret is stored encrypted and is never shown again; make a new one at any time.
When the receiver is down
A failed delivery is retried with a growing wait: 30 s, 2 min, 10 min, 30 min, 1 h, 2 h, 4 h, 8 h. An entry is given up on after 24 hours. After 8 failures in a row sending is paused, the owners and admins are told, and entries keep waiting. Resume from the settings page when the receiver works. Send a test event posts one signed event with type test so you can try your check.
API
curl -s https://api.cloudverg.com/v1/audit/webhook -H "Authorization: Bearer $VERG_API_KEY"