---
title: "Update Policy"
method: PATCH
path: "/api/policies/{policy_id}"
tags: ["policies"]
---

# Update Policy

`PATCH /api/policies/{policy_id}`

## Request

- Base URL: `https://www.gateco.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://www.gateco.ai/api/policies/{policy_id}`
- Auth: OAuth 2 (password, token URL `/api/auth/login`)

## Path parameters

- `policy_id` string, uuid, required

## Request body

- UpdatePolicyRequest
  - `name` string, nullable
  - `description` string, nullable
  - `effect` string, nullable
  - `resource_selectors` object[], nullable
  - `rules` PolicyRuleRequest[], nullable
    - `description` string, nullable
    - `effect` string, required
    - `conditions` object[], nullable
    - `priority` integer
  - `apply_to_all_resources` boolean

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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