---
title: "PATCH /workspaces/{workspace}/policies/{policy}/"
method: PATCH
path: "/workspaces/{workspace}/policies/{policy}/"
tags: ["workspaces"]
---

# PATCH /workspaces/{workspace}/policies/{policy}/

`PATCH /workspaces/{workspace}/policies/{policy}/`

Partially update a policy.

## Path parameters

- `policy` string, required
- `workspace` string, required

## Request body

- PatchedPolicy
  - `created_at` string, date-time — The date and time the policy was created.
  - `description` string, nullable — The description of the Policy.
  - `name` string — The name of the Policy.
  - `rego` string — The rego code which constitutes the Policy logic.
  - `enabled` boolean — If true, the policy is enabled.
  - `is_terminal` boolean — If true and the policy matches, no further policies are evaluated.
  - `read_only` boolean — Whether this policy is read-only (only specific variables can be updated).
  - `slug_perm` string — The Policy identifier.
  - `updated_at` string, date-time — The date and time the policy was updated.
  - `version` integer — The version of the rego code.
  - `precedence` integer — The order in which this policy is evaluated relative to other policies.

## Response `200`

- Policy
  - `created_at` string, date-time, required — The date and time the policy was created.
  - `description` string, nullable — The description of the Policy.
  - `name` string, required — The name of the Policy.
  - `rego` string, required — The rego code which constitutes the Policy logic.
  - `enabled` boolean — If true, the policy is enabled.
  - `is_terminal` boolean — If true and the policy matches, no further policies are evaluated.
  - `read_only` boolean, required — Whether this policy is read-only (only specific variables can be updated).
  - `slug_perm` string, required — The Policy identifier.
  - `updated_at` string, date-time, required — The date and time the policy was updated.
  - `version` integer, required — The version of the rego code.
  - `precedence` integer — The order in which this policy is evaluated relative to other policies.

---

[API](https://skmtc.net/cloudsmith/apis/cloudsmith-api.md) · [All operations](https://skmtc.net/cloudsmith/apis/cloudsmith-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cloudsmith/cloudsmith-api/versions/977ffbd0e8bd/schema)
