---
title: "List security group templates"
method: GET
path: "/api/v1/security-groups/templates"
tags: ["Networking"]
---

# List security group templates

`GET /api/v1/security-groups/templates`

Pre-built security group templates customers can clone when creating a new group (e.g. "Web server", "SSH only", "Database"). Pass the chosen `id` as `template_id` on `POST /api/v1/security-groups`.

## Response `200`

List of templates

- object
  - `success` boolean
  - `data` SecurityGroupTemplate[]
    - `id` string, required — Template ID — pass as `template_id` when creating a security group.
    - `name` string, required
    - `description` string
    - `rules` SecurityGroupRule[], required
      - `protocol` 'TCP' | 'UDP' | 'ICMP' | 'ICMPV6' | 'IPSEC' | 'ALL', required — Network protocol.
      - `rule_type` 'INBOUND' | 'OUTBOUND', required — Direction of traffic.
      - `range` string — Port or port range. Single port (`80`) or range (`8000:9000`). Empty for ICMP/ALL.
      - `ip` string — Source/destination IP for the rule. Empty means any.
      - `size` integer — CIDR block size (e.g. `24` for /24). Used with `ip` to allow a network range.
      - `icmp_type` integer — ICMP message type (only for ICMP/ICMPV6 protocols).

## Other responses

- `401` — Authentication required

---

[API](https://skmtc.dev/rafftechnologies/apis/raff-api.md) · [All operations](https://skmtc.dev/rafftechnologies/apis/raff-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rafftechnologies/raff-api/revisions/2f4df56be77c/schema)
