Toggle Firewall
Enable or disable the firewall on a VPS.
Request
PUT /api/v1/vps/{id}/firewall
Required scope: vps:manage
Path Parameters
| Parameter |
Type |
Description |
id |
string |
The VPS ID |
Headers
| Header |
Required |
Value |
Authorization |
Yes |
Bearer YOUR_API_KEY |
Content-Type |
Yes |
application/json |
Request Body
| Field |
Type |
Required |
Description |
enabled |
boolean |
Yes |
true to enable, false to disable |
{
"enabled": true
}
Response
{
"data": {
"enabled": true,
"success": true
}
}
Errors
| Status |
Code |
Description |
| 400 |
INVALID_BODY |
Request body is not valid JSON |
| 404 |
NOT_FOUND |
VPS not found or not accessible |
| 502 |
FIREWALL_ERROR |
Firewall operation failed on the server |
Example
curl -X PUT "https://site.quest/api/v1/vps/699cdea2ab57a244bb5273fd/firewall" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled": true}'
MCP
This action is also available via the manage_firewall MCP tool.