---
title: "Update a rule"
method: PUT
path: "/v1/firewalls/policies/{policyID}/rules/{ruleID}"
tags: ["public", "firewalls"]
---

# Update a rule

`PUT /v1/firewalls/policies/{policyID}/rules/{ruleID}`

## Request

- Base URL: `https://api.vozora.io`
- URL: `https://api.vozora.io/v1/firewalls/policies/{policyID}/rules/{ruleID}`
- Auth: API key in header `Authorization`

Replaces the rule's mutable fields. Every field is written, so send the whole rule.

## Path parameters

- `policyID` string, required
- `ruleID` string, required

## Request body

- FirewallCreateRuleRequest
  - `action` string
  - `conn_state` string
  - `description` string
  - `direction` string
  - `dst_cidr` string
  - `enabled` boolean
  - `ip_version` string
  - `name` string
  - `port_max` integer
  - `port_min` integer
  - `position` integer
  - `protocol` string
  - `src_cidr` string

## Response `200`

OK

- FirewallPublicRule
  - `action` string
  - `conn_state` string
  - `created_at` string
  - `description` string
  - `direction` string
  - `dst_cidr` string
  - `enabled` boolean
  - `id` string
  - `ip_version` string
  - `name` string
  - `policy_id` string
  - `port_max` integer
  - `port_min` integer
  - `position` integer
  - `protocol` string
  - `src_cidr` string
  - `updated_at` string

## Other responses

- `400`: invalid request body
- `401`: invalid or missing API key
- `403`: the key lacks firewall:write
- `404`: no such resource, or it belongs to another account
- `422`: validation_error, or too_many_rules — a policy holds at most 100 rules

---

[API](https://skmtc.dev/vozora/apis/vozora-api.md) · [All operations](https://skmtc.dev/vozora/apis/vozora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/vozora/apis/vozora-api/revisions/56f15734fc5a?raw)
