POST /rules

Create a new firewall rule

Creates a new firewall rule with the provided details.

Request Body

idinteger
destinationstringRequired
actionstringRequired
permitdeny
notestring
protocolintegerRequired
146174750
sourcestring
orderintegerRequired
destination_portobject
match_typestring
eqgtltneqrange
match_valuearray
rangeobject
startinteger
endinteger
source_portobject
match_typestring
eqgtltneqrange
match_valuearray
rangeobject
startinteger
endinteger
matchesarray

Response

200
400
dataobject
rule_idinteger
successboolean

Request

curl -X POST "https://shield.royalehosting.net/api/v2/rules" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-organization-id: YOUR_ORG_ID" \
  -H "Content-Type: application/json" \
  -d '{}'

Response

{
  "data": {
    "rule_id": 12243
  },
  "success": true
}