Enable or disable CrowdSec protection for your VPS

Activate or deactivate CrowdSec firewall protection for your virtual server (VPS). Returns a `requestId` to track the operation's status in subsequent calls, ensuring correct protection configuration.

Path Parameters

vmid integer · min: 1 required Example

Unique vmid identifier

Headers

Accept Example
Content-Type Example

Body

required
application/json
enable_protection boolean required

Responses

200
success boolean
timestamp string
requestId string
data object
400
error string
message string
code string
timestamp string
requestId string
POST https://cloud.hostup.se/api/vm/{vmid}/crowdsec
For AI assistants
cURL
curl -X POST "https://cloud.hostup.se/api/vm/17409/crowdsec" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "enable_protection": true
  }'
Response
{
  "success": true,
  "timestamp": "string",
  "requestId": "string",
  "data": {
    "ips": [
      "string"
    ],
    "results": [
      {
        "ip": "string",
        "success": true,
        "message": "string"
      }
    ],
    "protection_active": true,
    "total_ips": 0,
    "success_count": 0,
    "fail_count": 0,
    "message": "string"
  }
}
Request Body
{
  "enable_protection": true
}