Webhooks
Keepcord POSTs a signed JSON payload to your endpoint for every event you subscribe to. Verify the signature, respond 2xx quickly, and do the work asynchronously.
Setup
- 1
Dashboard/Developer/Webhooks/Add
HTTPS URL, one or more events (wildcards allowed: * or pull.*). Private and loopback addresses are refused. - 2
Copy the secret
Shown once. Used to sign every delivery. - 3
Send a test
The Test button delivers asettings.updatedevent immediately so you can check your handler.
Webhooks are a Premium and Plus feature.
Events
verify.success
Meaning
A member verified and was allowed.
Notes
targetId = user id; data: status, trustScore, country, flags
verify.flagged
Meaning
Verified but flagged (alt suspect, rule).
Notes
data: flags, reason
verify.blocked
Meaning
Verification refused.
Notes
data: reason (vpn, blacklist, country, age, rule), vpnProvider
verify.revoked
Meaning
Member revoked the app or the token could not be refreshed.
Notes
member.deleted
Meaning
Verification data deleted (dashboard, /deluser, API, retention).
Notes
member.deauthorized
Meaning
A member revoked Keepcord in Discord's Authorized Apps (periodic check or failed token refresh).
Notes
data: source, rolesRemoved, rolesRestored
member.reminded
Meaning
Reminder DMs sent to unverified members before the auto-kick.
Notes
data: count
member.alt_banned
Meaning
A suspected alt was banned (alt action Ban), or the ban was skipped by the hierarchy checks.
Notes
data: altOf, score, evidence, banned, skipped
member.alt_timeout
Meaning
A suspected alt was timed out for 7 days until staff decide (alt action Timeout), or the timeout failed.
Notes
data: altOf, score, until, applied
member.blacklisted
Meaning
User added to the blacklist.
Notes
data: reason, kinds
member.whitelisted
Meaning
User added to the whitelist.
Notes
pull.started / pull.progress / pull.completed / pull.failed
Meaning
Pull job lifecycle. progress is sent at most every 30 seconds.
Notes
data: jobId, progress
backup.started / backup.completed / backup.failed
Meaning
Backup job lifecycle.
Notes
data: jobId, version, stats
restore.started / restore.completed / restore.failed
Meaning
Restore job lifecycle.
Notes
data: jobId, mode, plan
incident.nuke
Meaning
Anti-nuke triggered.
Notes
data: actorId, actions, action taken, backupVersion
incident.mass_ban
Meaning
Many bans in a short window.
Notes
data: actorId, count
incident.guild_deleted
Meaning
Keepcord lost the server (deleted or bot kicked and server gone).
Notes
incident.bot_removed
Meaning
The bot was removed from the server.
Notes
guild.joined / guild.left
Meaning
Bot joined or left.
Notes
settings.updated
Meaning
Dashboard settings changed.
Notes
data: keys
team.updated
Meaning
Team member added, changed or removed.
Notes
job.cancelled
Meaning
A job was cancelled.
Notes
data: jobId, type
Payload
Delivery
POST /hooks/keepcord HTTP/1.1
Host: example.com
Content-Type: application/json
User-Agent: Keepcord-Webhooks/1.0
X-Keepcord-Event: verify.blocked
X-Keepcord-Timestamp: 1760950872
X-Keepcord-Signature: sha256=5b1c0f…e2a9
{"event":"verify.blocked","guildId":"987654321098765432","timestamp":"2026-10-20T09:41:12.000Z","actorId":null,"targetId":"240000000000000077","message":"Blocked: VPN detected (NordVPN)","data":{"reason":"vpn","vpnProvider":"NordVPN","country":"NL"}}X-Keepcord-Event
Value
Event type, same as the body's event field.
X-Keepcord-Timestamp
Value
Unix seconds when the delivery was signed. Reject deliveries older than 5 minutes to prevent replays.
X-Keepcord-Signature
Value
sha256= + hex HMAC-SHA256 of {timestamp}.{rawBody} with your secret.Verifying the signature
Use the raw body
Compute the HMAC over the exact bytes you received, before any JSON parsing or re-serialization. Frameworks that parse JSON automatically usually expose the raw body through a dedicated option.import express from "express";
import { createHmac, timingSafeEqual } from "node:crypto";
const app = express();
const SECRET = process.env.KEEPCORD_WEBHOOK_SECRET;
app.post("/hooks/keepcord", express.raw({ type: "application/json" }), (req, res) => {
const ts = req.header("x-keepcord-timestamp") ?? "";
const given = req.header("x-keepcord-signature") ?? "";
if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return res.sendStatus(400);
const expected = "sha256=" + createHmac("sha256", SECRET).update(`${ts}.${req.body}`).digest("hex");
if (given.length !== expected.length || !timingSafeEqual(Buffer.from(given), Buffer.from(expected))) {
return res.sendStatus(401);
}
const event = JSON.parse(req.body);
res.sendStatus(204); // ack first
queueMicrotask(() => handle(event)); // then work
});
function handle(event) {
if (event.event === "verify.blocked") console.log("blocked", event.targetId, event.data.reason);
}
app.listen(3000);Retries & disabling
- A delivery is successful on any
2xxwithin 8 seconds. - Failures are retried with exponential back-off after 1, 2, 4 and 8 minutes (5 attempts in total), then the delivery is marked failed.
- Each delivery, its response code and attempt count is visible under Developer/Webhooks/Deliveries.
- A successful delivery resets the failure counter; after 25 consecutive failed attempts the webhook is disabled and shown as such in the dashboard. Re-enable it once your endpoint is back.
- Deliveries are at-least-once. Use
X-Keepcord-TimestampplustargetId/data.jobIdas an idempotency key if duplicates matter.
Testing locally
Expose a local port with a tunnel (ngrok, cloudflared, tailscale funnel) and point the webhook at the public URL. The Test button in the dashboard sends a real signed delivery. You can also replay the signature logic offline:
import { createHmac } from "node:crypto";
const secret = "whsec_test";
const ts = Math.floor(Date.now() / 1000);
const body = JSON.stringify({ event: "settings.updated", guildId: "1", timestamp: new Date().toISOString(), actorId: null, targetId: null, message: "test", data: {} });
console.log("X-Keepcord-Timestamp:", ts);
console.log("X-Keepcord-Signature: sha256=" + createHmac("sha256", secret).update(`${ts}.${body}`).digest("hex"));Prefer polling? The same events are available through GET /v1/logs.