---
title: "Create firewall"
method: POST
path: "/firewalls"
tags: ["Firewalls"]
---

# Create firewall

`POST /firewalls`

Create a firewall

## Request body

- object
  - `data` object, required
    - `type` 'firewalls', required
    - `attributes` object
      - `name` string, required
      - `project` string, required
      - `tags` string[] — IDs of the tags to attach to the firewall
      - `rules` object[] — Firewall rules. When empty, Latitude seeds a default rule allowing SSH (TCP port 22) from any source.
        - `from` string — Source IP address, IP range in CIDR notation, or 'ANY' (e.g., "192.168.1.1", "192.168.1.0/24", "ANY")
        - `to` string — Destination IP address, IP range in CIDR notation, or 'ANY' (e.g., "192.168.1.1", "192.168.1.0/24", "ANY")
        - `protocol` 'TCP' | 'UDP'
        - `port` string — Port number or range (e.g., "80", "80-443")
        - `description` string, nullable — Optional description explaining the purpose of this rule

## Response `201`

Created

## Changes

- **2026-08-19** `9545f24e8507` — 3 info
  - added the new optional request property `data/attributes/tags` (media type: application/json)
  - added the new optional request property `data/attributes/tags` (media type: application/vnd.api+json)
  - added the optional property `data/attributes/tags` to the response with the `201` status

[Change history](https://skmtc.dev/latitude/apis/latitude-sh-api/changes/firewalls/post.md)

---

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