---
id: approval-action-update
title: "Update an action"
description: "Updates the `on_policy_success`, `on_policy_fail`, `on_checklist_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: eJztWf9v27gV/1ce+MvaQHHSNB02DR3gy/XQ7IquSN31gCSwGfLZ4lUiVZKy4zP0vw+PlGTJdtquu7sNW/ODI1EU3+d93leKGybRCatKr4xmKXtXSu7Rgc8QZkZPS5MrsZ66Sgh0bpb0B+dc5c2IyFB8yJXz3aBXBU69mVos8/UsAa4lzHiemxXKafsQ71FUHmcwV5hLB2YOXAPeK+eVXgAvS2uWPAcuCN6IJcyUaDndXEqWsnbCNE5Iq4CeJczzhWPpNRuHcXabsJJbXqBHS+MbpkjZkvuMJUzzAlnKlGQJcyLDgrN0w/y6DKPa4wItqxNm8WOlLEqWelthssPcJEO4/J5UIO72oNe3CXMoKqv8OiC4Q27RjiufsfT6lh7T+uj8d0auCYAw2qP2dMnLMlci6H3ysyNxm32k5u5nFJ4lrLTEklfo6OmeEXuvOG+VXrCEoa4K4ivCJgYLriueE3P7akadwBu4Q/D8A2owGqIUaKSQsfCeF2WOnaGQWBz6z6fANBAIgV5/BRJav7I4RBLWijCGTvspJOGlhJWoZXzwEDvvM+4h42WJ2hEqcoXGrLDKUIPyDjq5YCsNFp3Jl+iAO5iF6BnB33W+BotcgtK96YWR+JdGu2O6afR3UDnci0xQ2nnkcnSjb/QxzEiJWTqApBxI1AolmMpbtcj8CK5wqXCF1gG3CBqXaEEbr+Y0jaI46g42zAPB9R88sd+siSTvGGYNVzsCnedrB6ZEPYLJdhwtzNV9k3YEJ21IUvPUAV9wpROSJTB3CRgL3H1wMKeLIaAEVpkSGakWCLdDdRpFIsb44g7EhcFguqGagRzgK75ukD2w6o3+KxwdvTYe06MjuJyDKZT3KBPwmXKw5HmFIHHOq9wHMUdHDVNHRyMYa1B6yXMlm5kWfWW1g9n56Slcvv7H+NXl99OLly8ufnx1+XYy/W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hAdrKGcSb/qcgcFz+fGFlTmiF3tudIoO5fue3Bdxwh5dihC3kb6dyNEaRn8nD7oalDOVQgmdjPjN5fglMT/sdBwfSIaZ3hGofHs9Ix+ng4N/+w/FxWkrNU8n8ZJ00jZ7xYfl414aFznBc2JkfI27rXgneZLrnJadS9gDr7+m4bOWEOl8b5E4VE2KhkhKmupjr3JkTsEb9exJYOce7Rt1ARcPjMynjyILOwc6fM/O2nr0EmsQycbJetmw9meWFQ2ZynLvC9denLCSzXSVZ6XOfcUvCNhisEZw1uKl+jm/ZOGjhBaqD3vCPkxTGJJc/GDsQWnnd3f3k/CHo7i8Gp7QPFiuxM8sLvrbeJ2d0btZuHABqPflQ0ar65X+USr0lX3hCk9NwSMqItmfjI6HZ32ur1xQzf5SmmcL3jIMc1BUDwDo2TVffAYeE3vaOa//ryssbbHe39S5lyFzwTBlTaN8113TdD2w1vCUiUpX2bGeZqy2dxxh+9sXtc0/LFC2t9f3yZsya2i4Aw+KpWja8nSOc/d7hFZn7dHV03WfgyfOTh7QIdmkAdnCrsBljKWsA+4jmd59W2dsAy5RBuwxQcXEcHxZB2+bLUv7lWcOmnfGAuBpf/k3NteZL8ZTy5eUhg1p3hFSOvM8hWVKr6KKE2gJERnGNuwnOtFFXIWi4tS0PFhzO7EaFDrIA+bTZwxMR9Q13VHi6d7Yqau/wmHd4bc
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`, `on_checklist_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"},"on_checklist_fail":{"type":"string","enum":["deny","pending","manual"],"description":"What happens to the request when its checklist run resolves as `fail`. Only read in checklist mode; policy-mode actions use `on_policy_fail` instead.\n\n- `deny`: the request is denied outright. Reviewers are never notified and manual review can't be requested.\n- `pending`: the request stays open. The requester fixes the cause and requests again, cancels, or asks for a manual review, which is when reviewers are notified.\n- `manual`: the request goes to manual review right away and reviewers are notified.\n\n> **Note:** If omitted, this value defaults to **pending**. An invalid value returns `400 INVALID_CHECKLIST_FAIL_PATH`.\n","example":"manual","title":"on_checklist_fail"},"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"},"on_checklist_fail":{"type":"string","enum":["deny","pending","manual"],"description":"What happens to the request when its checklist run resolves as `fail`. Only read in checklist mode; policy-mode actions use `on_policy_fail` instead.\n\n- `deny`: the request is denied outright. Reviewers are never notified and manual review can't be requested.\n- `pending`: the request stays open. The requester fixes the cause and requests again, cancels, or asks for a manual review, which is when reviewers are notified.\n- `manual`: the request goes to manual review right away and reviewers are notified.\n\n> **Note:** If omitted, this value defaults to **pending**. An invalid value returns `400 INVALID_CHECKLIST_FAIL_PATH`.\n","example":"manual","title":"on_checklist_fail"},"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>


      