---
id: approval-action-update
title: "Update an action"
description: "Updates the `on_policy_success`, `on_policy_fail`, `time_to_reply`, and `allowed_time_to_execute` fields of an existing approval action."
sidebar_label: "Update an action"
hide_title: true
hide_table_of_contents: true
api: eJztWG2P2zYS/isEvzRZKN7NZvfQCkiBba6HbgsEQbJBC+wu7DE5tthQpEJS9rqG/vthSEmWbOelvfZa9G4/eCWKIp95Zp6ZEbdcohdOVUFZw3P+tpIQ0LNQIJtZM62sVmIz9bUQ6P0sGw4uQGkaCarEabBTh5XezDIGRrIZaG3XKKfdQ3xAUQecsYVCLT2zCwaG4YPyQZklg6pydgWagSAkE55xW6EDurmWPOfdhGmakNcRKM94gKXn+S2/iuP8PuMVOCgxoKPxLVdkVwWh4Bk3UCLPuZI8414UWALPtzxsqjhqAi7R8SbjDt/XyqHkeXA1Znsk3RTIrv9JJhBNB9Cb+4x7FLVTYRMRzBEcuqs6FDy/vafHtD768I2VGwIgrAloAl1CVWklot2nP3vabnuI1M5/RhF4xitHLAWFnp4e+Gvwig9OmSXPOJq6JL4SbGKwBFODJuYOzUw2sWDZHFmAd2iYNSztwtpdyFn4AGWlsXcUEovjUPkYmBYCITCb34CE1q8djpHEtZqMj+LziL/3d/vOrpm2ZskeKcNKpbXyKKyR/nHra3SeFbBCAuPQV9ZINseFdRgDonUuw4dKOfQTdp0CZa2MtGsmtPXo2VqFwtaBAZMolFfWZKO3fYBQe1baFcnRsllaTs5GRp5ffnV+Rn9Nxj8guf/Q4kVAt4vxsPOEAEOuaHeR0cx0Q0+lRW++CKyAqkITrVWGhUL5lodk7ax/Y5oMnn3K4i//cZEMjp4Ng5jrk8OPTgXkTdNEJZN/fBLI+dkZ/TsMrj7XsDX4Lq4Xtaadf7M4d0nkNmUc40yM+UCJIeOwy1gjGSv5GS67YrVR72tkStKCC4WOLaw7npEG9D09f3bRJChH9Li/h0NvaydGuzx6+frlY+YrFGqxody9LjBGvvJdaESecC8xWLcEo36J7D1/moMQtjbh+XlOSdlXIPD5s3zA8PM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zjEpH/Wfc6PAGJy5/ZXOPFvfBXwIp5UGFb93YmBs21C67Vua3QlCxnMlKfsV1geast3OweNbp5uGht/XSB8qt/cZX4FTJLUYcVJ5upY8X4D2+8ecQ4oevW5z8GP2icPPD9jQDkIMjdiq85zzjL/DTTqPbe6bjBcIEl3Elh68SAie3GziJ3r34kH9aLLujSshsAofnXs/0Omrq5sX35Eo2pPYMiZp7mBNhQfWCaWNlEStxbEt12CWdcxAPC1KEoKxAvcUF806ysN2m2bc2HdomqanJdA9MdM0/waw6Ucj
sidebar_class_name: "patch api-method"
info_path: docs/api/approval
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Update an action"}
>
</Heading>

<MethodEndpoint
  method={"patch"}
  path={"/approval/action/{id}"}
  context={"endpoint"}
>
  
</MethodEndpoint>



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

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"in":"path","name":"id","schema":{"type":"integer"},"required":true,"description":"The ID of the approval action."}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"type":"object","properties":{"on_policy_success":{"type":"string","enum":["approve","manual"],"description":"The action to be taken on policy success.","example":"approve"},"on_policy_fail":{"type":"string","enum":["manual","deny"],"description":"The action to be taken on policy failure.","example":"deny"},"time_to_reply":{"type":"integer","description":"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`.","example":259200000},"allowed_time_to_execute":{"type":"integer","description":"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`.","example":86400000}},"title":"approval_actionWrite"}}}}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"The operation was successful.","content":{"application/json":{"schema":{"type":"object","required":["id","nrn","entity","action"],"properties":{"id":{"type":"integer","description":"A unique identifier for the approval action.","example":1234},"nrn":{"type":"string","description":"A resource identifier (NRN) specifying where this action applies.","example":"organization=1:account=2:namespace=3:application=4"},"entity":{"type":"string","description":"The entity that requires approval.","enum":["deployment","scope","service:action","parameter","action_item"],"example":"deployment","title":"entity"},"action":{"type":"string","description":"The action that requires approval.","enum":["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"],"example":"deployment:create","title":"action"},"dimensions":{"type":"object","description":"Key-value pairs defining the scope of the action.","example":{"environment":"production","country":"us"}},"on_policy_success":{"type":"string","enum":["approve","manual"],"description":"The action to be taken when the policy check is successful.\n\n> **Note:** If omitted, this value defaults to **manual**.\n","example":"approve"},"on_policy_fail":{"type":"string","enum":["manual","deny"],"description":"The action to be taken when the policy check fails.\n\n> **Note:** If omitted, this value defaults to **manual**.\n","example":"deny"},"time_to_reply":{"type":"integer","description":"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`.","example":259200000},"allowed_time_to_execute":{"type":"integer","description":"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`.","example":86400000}},"title":"approval_action"}}}},"4XX":{"description":"Client error responses due to invalid input or missing parameters.","content":{"application/json":{"schema":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code representing the specific client error (e.g., 400, 401, 403, 404).","example":400},"code":{"type":"string","description":"A machine-readable error code that categorizes the server failure.","example":"bad_request"},"error":{"type":"string","description":"A brief, human-readable description of the error type (e.g., \"Bad Request\", \"Unauthorized\").","example":"Bad Request"},"message":{"type":"string","description":"Additional details about the error.","example":"The request was malformed or contained invalid parameters."}}}}}},"5XX":{"description":"Server error responses indicating an issue on the API side.","content":{"application/json":{"schema":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code representing the specific server error (e.g., 500, 502, 503).","example":500},"code":{"type":"string","description":"A machine-readable error code that categorizes the server failure.","example":"internal_server_error"},"error":{"type":"string","description":"A brief, human-readable description of the error type (e.g., \"Internal Server Error\", \"Service Unavailable\").","example":"Internal Server Error"},"message":{"type":"string","description":"Additional details about the error.","example":"An unexpected error occurred. Please try again later."}}}}}}}}
>
  
</StatusCodes>


      