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

# PUT /workspaces/{workspace}/policies/{policy}/actions/{action}/

`PUT /workspaces/{workspace}/policies/{policy}/actions/{action}/`

Update an action for a policy.

## Path parameters

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

## Request body

- union
  - SetPackageStatePolicyActionTyped
    - `action_type` string, required
    - `precedence` integer — The order in which this action occurs relative to other actions for the same policy.
    - `slug_perm` string, required — The Action identifier.
    - `created_at` string, date-time, required — The date and time the policy was created.
    - `updated_at` string, date-time, required — The date and time the policy was updated.
    - `effect` string, required
    - `package_state` 'AVAILABLE' | 'DELETED' | 'QUARANTINED' | 'HIDDEN', required — * `AVAILABLE` - The package is available for download. * `DELETED` - The package is deleted. * `QUARANTINED` - The package is quarantined. * `HIDDEN` - The package is hidden.
  - AddPackageTagsPolicyActionTyped
    - `action_type` string, required
    - `precedence` integer — The order in which this action occurs relative to other actions for the same policy.
    - `slug_perm` string, required — The Action identifier.
    - `created_at` string, date-time, required — The date and time the policy was created.
    - `updated_at` string, date-time, required — The date and time the policy was updated.
    - `effect` string, required
    - `tags` string[], required
  - RemovePackageTagsPolicyActionTyped
    - `action_type` string, required
    - `precedence` integer — The order in which this action occurs relative to other actions for the same policy.
    - `slug_perm` string, required — The Action identifier.
    - `created_at` string, date-time, required — The date and time the policy was created.
    - `updated_at` string, date-time, required — The date and time the policy was updated.
    - `effect` string, required
    - `tags` string[], required

## Response `200`

- union
  - SetPackageStatePolicyActionTyped
    - `action_type` string, required
    - `precedence` integer — The order in which this action occurs relative to other actions for the same policy.
    - `slug_perm` string, required — The Action identifier.
    - `created_at` string, date-time, required — The date and time the policy was created.
    - `updated_at` string, date-time, required — The date and time the policy was updated.
    - `effect` string, required
    - `package_state` 'AVAILABLE' | 'DELETED' | 'QUARANTINED' | 'HIDDEN', required — * `AVAILABLE` - The package is available for download. * `DELETED` - The package is deleted. * `QUARANTINED` - The package is quarantined. * `HIDDEN` - The package is hidden.
  - AddPackageTagsPolicyActionTyped
    - `action_type` string, required
    - `precedence` integer — The order in which this action occurs relative to other actions for the same policy.
    - `slug_perm` string, required — The Action identifier.
    - `created_at` string, date-time, required — The date and time the policy was created.
    - `updated_at` string, date-time, required — The date and time the policy was updated.
    - `effect` string, required
    - `tags` string[], required
  - RemovePackageTagsPolicyActionTyped
    - `action_type` string, required
    - `precedence` integer — The order in which this action occurs relative to other actions for the same policy.
    - `slug_perm` string, required — The Action identifier.
    - `created_at` string, date-time, required — The date and time the policy was created.
    - `updated_at` string, date-time, required — The date and time the policy was updated.
    - `effect` string, required
    - `tags` string[], required

## Changes

> 13 revisions in range; 6 could not be searched.

- **2026-07-26** `3f44fa7d59b0` — 2 info
  - the endpoint scheme security `apikey` was removed from the API
  - the endpoint scheme security `basic` was removed from the API

[Change history](https://skmtc.dev/cloudsmith/apis/cloudsmith-api/changes/workspaces/:workspace/policies/:policy/actions/:action/put.md)

---

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