Webhook Events
Configure signed RestoreCord webhook event delivery for external systems, including headers, payload shape, events, and delivery behavior.
Overview
Webhook events send RestoreCord activity to your own HTTPS endpoint. Use them for audit trails, moderation pipelines, ticketing, internal dashboards, or automation that needs to react when RestoreCord records change.
Enterprise webhook events are different from Discord webhook logs. Discord webhook logs post messages into a Discord channel; webhook events are signed HTTP requests to infrastructure you control.
Configure Delivery
Create an HTTPS receiver
Your endpoint must accept JSON POST requests and return a 2xx response after processing or safely queueing the event.
Set the webhook URL
Configure the server webhook URL in RestoreCord server settings or through the server API.
PATCH /api/v3/servers/{serverId}
Content-Type: application/json
{
"webhookUrl": "https://example.com/restorecord/events"
}Verify before acting
Use the webhook secret to verify the signature header before trusting the payload.
Only send events to endpoints you control.
Headers
| Header | Value |
|---|---|
Content-Type | application/json |
X-Webhook-Event | Event name, such as member.verified. |
X-Signature-256 | sha256= followed by the hex HMAC-SHA256 of the raw request body. |
Signature Verification
Verify signatures against the raw request body. The header always starts with sha256=; strip the prefix before comparing.
import crypto from "crypto";
function verifyRestoreCordSignature(rawBody: Buffer | string, signatureHeader: string, secret: string) {
const expected = crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
const actual = signatureHeader.replace(/^sha256=/, "");
const expectedBuffer = Buffer.from(expected, "hex");
const actualBuffer = Buffer.from(actual, "hex");
return expectedBuffer.length === actualBuffer.length && crypto.timingSafeEqual(expectedBuffer, actualBuffer);
}Verify the exact raw body bytes received by your framework. Re-stringifying parsed JSON can change whitespace or field order and break signature checks.
Payload Shape
Every event includes the event name, creation time, server context when available, and event-specific data.
{
"event": "member.verified",
"timestamp": "2026-06-07T12:00:00.000Z",
"server": {
"guildId": "123456789012345678",
"name": "My Server"
},
"data": {
"userId": "234567890123456789",
"username": "member",
"avatar": "a1b2c3d4e5f6",
"ip": null,
"countryCode": "US",
"isNewMember": true
}
}| Field | Description |
|---|---|
event | RestoreCord event name. |
timestamp | ISO timestamp generated by RestoreCord. |
server | The Discord server ID (guildId) and the RestoreCord server name. |
data | Event-specific payload. Treat unknown fields as additive changes. |
Events
Use the event name to route payloads in your receiver. These are all the events RestoreCord sends.
| Event | When it fires | Important data |
|---|---|---|
member.verified | A member successfully verifies through RestoreCord. | userId, username, avatar, ip, countryCode, isNewMember |
member.denied | A member is denied during verification. | userId, username, reason, details |
member.deauthorized | A member removes your bot from their Discord account, so they can no longer be pulled. Sent to every server that uses that bot. | userId, reason |
firewall.block | The firewall denies a verification attempt. | userId, username, ip, countryCode, action, reason; alt blocks also include matchedAccounts and hasMoreMatchedAccounts |
firewall.allow | The firewall lets a verification attempt through a rule or bypass. | userId, username, ip, countryCode, action, reason |
firewall.password | A member submits a verification password. | userId, username, ip, countryCode, action, reason, success |
snapshot.create | A snapshot is created from the dashboard or API. | snapshotId, snapshotName |
ip is only filled in when IP Logging is on; otherwise it is null.
Reason Values
member.denied reasons are vpn, wireless, alt, guild (server membership rule), rule (a firewall rule), email_required, condition_unavailable, account_age, or firewall when no more specific reason is known.
Sensitive fields such as IP address depend on server settings and plan access. Build receivers so nullable fields are accepted.
Delivery Behavior
- RestoreCord sends webhook events over HTTPS as JSON POST requests.
- Your receiver should return quickly; queue slow work in your own system.
- Delivery is best-effort; failed deliveries are not retried.
- Each request times out after 5 seconds. A slow or failing receiver never makes the verification or snapshot fail.
- Handlers should tolerate occasional duplicates.
Treat 2xx responses as accepted. Non-2xx receiver responses are not retried by RestoreCord, so queue and monitor failures on your side.