Skip to main content
POST
/
api
/
v1
/
security-groups
Create security group
curl --request POST \
  --url https://api.rafftechnologies.com/api/v1/security-groups \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --header 'X-Project-ID: <x-project-id>' \
  --data '
{
  "name": "web-server",
  "description": "<string>",
  "template_id": "web-server",
  "rules": [
    {
      "protocol": "TCP",
      "rule_type": "INBOUND",
      "range": "80",
      "ip": "0.0.0.0",
      "size": 123,
      "icmp_type": 123
    }
  ]
}
'
{
  "success": true,
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "web-server",
    "rules": [
      {
        "protocol": "TCP",
        "rule_type": "INBOUND",
        "range": "80",
        "ip": "0.0.0.0",
        "size": 123,
        "icmp_type": 123
      }
    ],
    "description": "<string>",
    "vm_count": 123,
    "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

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).

Body

application/json
name
string
required
Required string length: 1 - 64
Example:

"web-server"

description
string
template_id
string

Seed from a template. Template rules are copied, then merged with any explicit rules.

Example:

"web-server"

rules
object[]

Response

Security group created

success
boolean
data
object

A security group — a named set of inbound/outbound rules that can be attached to VM NICs.

Last modified on May 8, 2026