---
title: "Update an action"
method: PATCH
path: "/approval/action/{id}"
tags: ["Action"]
---

# Update an action

`PATCH /approval/action/{id}`

Updates the `on_policy_success`, `on_policy_fail`, `time_to_reply`, and `allowed_time_to_execute` fields of an existing approval action.

## Path parameters

- `id` integer, required

## Request body

- ApprovalActionWrite
  - `on_policy_success` 'approve' | 'manual' — The action to be taken on policy success.
  - `on_policy_fail` 'manual' | 'deny' — The action to be taken on policy failure.
  - `time_to_reply` integer — How long (in milliseconds) approvers have to respond before the request expires. If the window closes without a decision, the request status moves to `expired`.
  - `allowed_time_to_execute` integer — How long (in milliseconds) after approval the action can be executed. If execution doesn't happen within this window, the `execution_status` moves to `expired`.

## Response `200`

The operation was successful.

- ApprovalAction
  - `id` integer, required — A unique identifier for the approval action.
  - `nrn` string, required — A resource identifier (NRN) specifying where this action applies.
  - `entity` 'deployment' | 'scope' | 'service:action' | 'parameter' | 'action_item', required — The entity that requires approval.
  - `action` 'deployment:create' | 'scope:create' | 'scope:recreate' | 'scope:write' | 'scope:delete' | 'scope:stop' | 'service:action:create' | 'parameter:read-secrets' | 'action_item:resolve' | 'action_item:defer' | 'action_item:reject', required — The action that requires approval.
  - `dimensions` object — Key-value pairs defining the scope of the action.
  - `on_policy_success` 'approve' | 'manual' — The action to be taken when the policy check is successful. > **Note:** If omitted, this value defaults to **manual**.
  - `on_policy_fail` 'manual' | 'deny' — The action to be taken when the policy check fails. > **Note:** If omitted, this value defaults to **manual**.
  - `time_to_reply` integer — How long (in milliseconds) approvers have to respond before the request expires. If the window closes without a decision, the request status moves to `expired`.
  - `allowed_time_to_execute` integer — How long (in milliseconds) after approval the action can be executed. If execution doesn't happen within this window, the `execution_status` moves to `expired`.

## Other responses

- `4XX` — Client error responses due to invalid input or missing parameters.
- `5XX` — Server error responses indicating an issue on the API side.

---

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