v12

latestOpenAPI 3.0.3raw.githubusercontent.com2026-06-1811583196.1 KB
Networking

Create security group

Create a new security group with a set of inbound/outbound rules.

Optionally seed from a template (template_id from GET /api/v1/security-groups/templates) — its rules are copied as the starting set, then merged with any explicit rules you pass.

post/api/v1/security-groups

Headers

X-Project-IDstring uuid required

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

Request body

namestring required
descriptionstring
template_idstring

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

Example request

{
  "name": "web-server",
  "template_id": "web-server",
  "rules": [
    {
      "range": "80",
      "ip": "0.0.0.0"
    }
  ]
}

Response

Security group created

successboolean

Example response

{
  "data": {
    "name": "web-server",
    "rules": [
      {
        "range": "80",
        "ip": "0.0.0.0"
      }
    ]
  }
}