Assign a firewall group to a virtual server

Associate a specific firewall group with your virtual server (VM) to control network traffic. You need to provide the VM's ID and the ID of the firewall group to assign. This endpoint returns a `server_id` for use with `POST /api/server-tags`.

VPS Services Firewall

Context

Where to get IDs / values

Workflow links

Requires
Produces

Path Parameters

vmid integer · min: 1 required Example: 10000

Unique vmid identifier

Headers

Accept Example
Content-Type Example

Body

required
application/json
groupId string required · Example: 9294162d-47c2-45b0-941e-f4ac43629835

Responses

200
data object required
data.assignment object required
data.assignment.client_id integer required · Example: 30000
data.assignment.created_at string required · Example: 2026-02-10T00:00:00.000Z
data.assignment.group_id string required · Example: 9294162d-47c2-45b0-941e-f4ac43629835
data.assignment.hostbill_account_id string required · Example: 18375
data.assignment.id string required · Example: 2a9e2aae-276a-4da2-ab40-479374785588
data.assignment.last_applied_at string · nullable required · Example: 2026-02-10T00:00:00.000Z

Nullable: may be null when not applicable.

data.assignment.last_applied_status string required · Example: pending
data.assignment.last_error string · nullable required · Example: null

Nullable: may be null when not applicable.

data.assignment.proxmox_vm_id string required · Example: 11131
data.assignment.server_id string required · Example: 78
data.assignment.updated_at string required · Example: 2026-02-10T00:00:00.000Z
data.message string required · Example: Firewall group assignment queued for application

Human-readable message.

requestId string required · Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba

Unique request identifier (UUID).

success boolean required · Example: true

True for successful responses.

timestamp string required · Example: 2026-02-10T00:00:00.000Z

ISO 8601 timestamp (UTC).

POST https://cloud.hostup.se/api/vm/{vmid}/firewall/group
For AI assistants
cURL
curl -X POST "https://cloud.hostup.se/api/vm/10000/firewall/group" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "groupId": "9294162d-47c2-45b0-941e-f4ac43629835"
  }'
Response
{
  "success": true,
  "timestamp": "2026-02-10T00:00:00.000Z",
  "requestId": "2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba",
  "data": {
    "assignment": {
      "id": "2a9e2aae-276a-4da2-ab40-479374785588",
      "group_id": "9294162d-47c2-45b0-941e-f4ac43629835",
      "hostbill_account_id": "18375",
      "client_id": 30000,
      "proxmox_vm_id": "11131",
      "server_id": "78",
      "last_applied_at": "2026-02-10T00:00:00.000Z",
      "last_applied_status": "pending",
      "last_error": null,
      "created_at": "2026-02-10T00:00:00.000Z",
      "updated_at": "2026-02-10T00:00:00.000Z"
    },
    "message": "Firewall group assignment queued for application"
  }
}
Request Body Example 1
{
  "groupId": "9294162d-47c2-45b0-941e-f4ac43629835"
}