Skip to main content
POST
/
api
/
v1
/
vms
/
{id}
/
security-groups
Attach security group to VM NIC
curl --request POST \
  --url https://api.rafftechnologies.com/api/v1/vms/{id}/security-groups \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --header 'X-Project-ID: <x-project-id>' \
  --data '
{
  "security_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "nic_id": 123
}
'
{
  "success": true,
  "message": "Operation completed successfully"
}

Documentation Index

Fetch the complete documentation index at: https://docs.rafftechnologies.com/llms.txt

Use this file to discover all available pages before exploring further.

Updated May 8, 2026

Authorizations

X-API-Key
string
header
required

API key for authentication. Each key is bound to a specific account.

Headers

X-Project-ID
string<uuid>
required

Project ID. Required for all mutating operations (create, delete, power actions, resize).

Path Parameters

id
string<uuid>
required

VM ID (UUID)

Body

application/json
security_group_id
string<uuid>
required

Security group to attach.

nic_id
integer
required

NIC to attach the security group to. Get from GET /api/v1/vms/{id}/networks.

Response

Security group attached

success
boolean
Example:

true

message
string
Example:

"Operation completed successfully"

Last modified on May 8, 2026