Documentation

Firewall

Manage RestoreCord firewall logs, rules, passwords, bypasses, and Discord ban imports.

Copy page

All firewall endpoints require SERVER_FIREWALL when authenticated with an API key.

Logs

GET/api/v3/servers/{serverId}/firewall/logs

List firewall logs

Returns paginated firewall log entries.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.
pageOptional
Location
query
Type
integer
Default
1
Page number.
limitOptional
Location
query
Type
integer
Default
10
Page size, capped at 100.
userIdOptional
Location
query
Type
string
Optional Discord user ID filter.
actionOptional
Location
query
Type
string
Optional firewall action filter.
DELETE/api/v3/servers/{serverId}/firewall/logs

Clear firewall logs

Deletes firewall log history for a server.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.

Rules

GET/api/v3/servers/{serverId}/firewall/rules

List rules

Returns rules, statistics, and available firewall passwords.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.
POST/api/v3/servers/{serverId}/firewall/rules

Create rule

Creates a firewall rule.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.
ruleTypeRequired
Location
body
Type
string
`ALLOW`, `BLOCK`, or `REQUIRE_PASSWORD`.
targetTypeRequired
Location
body
Type
string
Target type such as `USER`, `IP`, `COUNTRY`, `ASN`, or `GUILD`.
targetValueRequired
Location
body
Type
string
Target value matching the selected type.
passwordIdOptional
Location
body
Type
string
Required for `REQUIRE_PASSWORD` rules.
assignedRoleIdOptional
Location
body
Type
string
Optional Discord role assigned by the rule.
PATCH/api/v3/servers/{serverId}/firewall/rules

Toggle rule

Enables or disables a rule.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.
idRequired
Location
body
Type
number
Firewall rule ID.
isActiveRequired
Location
body
Type
boolean
New active state.
GET/api/v3/servers/{serverId}/firewall/rules/{ruleId}

Get rule

Reads one firewall rule.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.
ruleIdRequired
Location
path
Type
string
Firewall rule ID.
PUT/api/v3/servers/{serverId}/firewall/rules/{ruleId}

Update rule

Updates a firewall rule.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.
ruleIdRequired
Location
path
Type
string
Firewall rule ID.
DELETE/api/v3/servers/{serverId}/firewall/rules/{ruleId}

Delete rule

Deletes a firewall rule.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.
ruleIdRequired
Location
path
Type
string
Firewall rule ID.

Passwords

GET/api/v3/servers/{serverId}/firewall/passwords

List passwords

Returns firewall password metadata and owner-visible password values.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.
POST/api/v3/servers/{serverId}/firewall/passwords

Create password

Creates a password used by password firewall rules.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.
passwordRequired
Location
body
Type
string
Password value.
passwordLabelRequired
Location
body
Type
string
Unique label, up to 100 characters.
maxUsesOptional
Location
body
Type
number
Optional maximum uses.
expiresAtOptional
Location
body
Type
string
Optional ISO date-time expiration.
PATCH/api/v3/servers/{serverId}/firewall/passwords

Toggle password

Enables or disables a firewall password.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.
idRequired
Location
body
Type
number
Password ID.
isActiveRequired
Location
body
Type
boolean
New active state.
GET/api/v3/servers/{serverId}/firewall/passwords/{passwordId}

Get password

Reads one firewall password.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.
passwordIdRequired
Location
path
Type
string
Password ID.
PUT/api/v3/servers/{serverId}/firewall/passwords/{passwordId}

Update password

Updates password metadata.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.
passwordIdRequired
Location
path
Type
string
Password ID.
DELETE/api/v3/servers/{serverId}/firewall/passwords/{passwordId}

Delete password

Deletes a firewall password.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.
passwordIdRequired
Location
path
Type
string
Password ID.

Bypasses

GET/api/v3/servers/{serverId}/bypass

List bypasses

Returns active bypasses or one user's bypass.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.
userIdOptional
Location
query
Type
string
Optional Discord user ID.
POST/api/v3/servers/{serverId}/bypass

Create bypass

Creates a temporary firewall bypass for a Discord user.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.
userIdRequired
Location
body
Type
string
Discord user ID.
durationOptional
Location
body
Type
string
Default
24h
One of `15m`, `1h`, `6h`, `24h`, `7d`.
DELETE/api/v3/servers/{serverId}/bypass

Remove bypass

Removes an active bypass for a user.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.
userIdRequired
Location
query
Type
string
Discord user ID.

Import Bans

GET/api/v3/servers/{serverId}/firewall/import-bans

Preview Discord bans

Lists Discord bans not already represented as firewall rules.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.
POST/api/v3/servers/{serverId}/firewall/import-bans

Import Discord bans

Creates BLOCK rules from Discord server bans.

serverIdRequired
Location
path
Type
string
Internal RestoreCord server ID.

Rule Types

Target type
USER
Accepted value
Discord user ID or alt-account-detection.
Target type
IP
Accepted value
IPv4 address, vpn-proxy-detection, or wireless-detection.
Target type
IP_RANGE
Accepted value
IPv4 CIDR range.
Target type
COUNTRY
Accepted value
One or more two-letter country codes.
Target type
CONTINENT
Accepted value
Continent code such as EU, NA, or a supported continent name.
Target type
ASN
Accepted value
Numeric ASN, with or without AS prefix.
Target type
DOMAIN
Accepted value
Domain name.
Target type
GUILD
Accepted value
Discord server ID. Requires Business plan or higher.
Example request JSON
{
  "ruleType": "BLOCK",
  "targetType": "COUNTRY",
  "targetValue": "RU,CN",
  "name": "Blocked countries"
}

Constraints

  • TIME target rules are rejected because time-based rules are not implemented.
  • REQUIRE_PASSWORD rules require an active firewall password.
  • Ban imports require Premium, Business, or Enterprise and a bot with Discord BAN_MEMBERS permission.
  • Password labels must be unique per server.
  • Bypass durations are limited to 15m, 1h, 6h, 24h, or 7d.

Firewall changes directly affect who can verify. Test restrictive rules with a known staff account before rolling them out broadly.