---
id: approval-action-create
title: "Create an approval action"
description: "Creates a new approval action."
sidebar_label: "Create an approval action"
hide_title: true
hide_table_of_contents: true
api: eJztWm1v2zgS/isDfrnWUBw3TQ63OvQAb66L5rboBo27u0AS2Iw4triRSJWk7HgN/ffDkJIsOUmT2/bugIXzwZEoipznmXfaGybQJkYWTmrFYnZqkDu0wEHhCnhRGL3kGfCEng9ZxHSBhtPNmWAxayZMw4Q48a+ziDm+sCy+ZGM/zq4jZvBzidZ9r8WaxRuWaOVQObrkRZHJxC96+JslMTbMJinmnK7cukAWM33zGyaOhXWkQUGrK6NYxFA56dYsYrzdrDAkp5NoaQmatl3JOiPVgkU7yMdg0OrSJAhS0JJziQZefPj44SXYAhM5X0u1gFWKBsGl0takgBcfLZGDdzwvMi+uWXAlf/eg3ryKeZLoUrk3R7HiOdqCJ/jmddwB/uaYVS2SJ2WdpAhhLriUO6g5sa3CvDCqzIkkgUWm1zmRHTGb6IL0Y9EsZYJxTVnECm54jg5Ny+NUOsyJzC2q3lJOOj9YC121/D9L/Jq8/0T8rXV5FLu3BncGVkZ27gRm2Lm1Thf3eNgu2dIRG+TiwNLazva5iclgsiXujAqc77IYG/TW+wiZHbepOa2ZrCImZI7KSq3sQ87Q5/VHXB8seVYiFFwaCwLnUpHRuhTBwwY99zdbf27l2TBUS2m08uqNyYVE2ViHt16zZjErLauqiGk1LXQmk/XUlkmC1j6k9UaFQa2EL+eq5Bnx8LhFaLhBcPwWFTmb8vKGvSBJMbkFaaHedF5mwyt1pf4Bg8EH7TAeDOBsDjqXzqGIgpsGRgTOeZk5S+sPBkGOwWB4pXpu20jaQzjnMvsSvBoUYVLrr8RGe9lvi8lLFQD5PTJp3ZOY/EsRK1CJ8OAxzf1CDpzyokDl5SBEdagPEKWz0O4LplRQu40FbmFGgsyG8JPK1kCuBlJ1puda4N9rhg7opmbSQmkRZn0dzUAq65ALz98BzAjELO6JJMkrlEQBunRGLlI3hI+4lLhCY4EbBIVLNKC0TwACuBIQsIPx8yDh6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Tco2T0RF9vO4r/uT/5xUE1iieTcOkaaDsf+YfZ/X2UJvOW5oTPOUi9FrwSfEllxmtes9hHnz9v+o6YwWlwrsCE4eihqSTpDSG8th5htwiOLMOJRlk3KFpvMbL5VJN38YW2jrfONJxDDts0tBh22EHfVh/dFMaOjlKnStsfHjICzlUZZYVGXfktsNE54zOc5rjngvylGDg3UOflgpayHe2NI0io5/EovriB21yTj3dv36Z+O6NPPDj9ivht/vTu68+vZNqrgkEqTgAfjUcDUedenRcWwTJT8aScx8FidL2u38KpzsHWrsG3vn2/ukfDNT24fDOHRYZl/5IwRvfprbUy7Zg6h3SpWTN8SXbbG64xU8mqyoa/lwiaeHyOmJLbiS5sD97jFiKXKDxxn2LpKjTIOXBZO0PnHx1H7TUTwRV1LwxThIs3BfnXncc7vyniwmZeP2bhtwHW2b4ihIIX7GY+V9MuMa8/NiGZVwtSh9JWFiTHIL3/WnHfzyq+hH3ltRIuNmEGRN9i6qqWFRDcXTPquuqqv4NWEzlYw==
sidebar_class_name: "post 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={"Create an approval action"}
>
</Heading>

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



Creates a new approval action.

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

<ParamsDetails
  parameters={undefined}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"type":"object","required":["nrn","entity","action"],"properties":{"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}},"example":{"nrn":"organization=1:account=2:namespace=3:application=4","entity":"deployment","action":"deployment:create","dimensions":{"environment":"production","country":"us"},"on_policy_success":"approve","on_policy_fail":"deny","on_checklist_fail":"pending","time_to_reply":259200000,"allowed_time_to_execute":86400000},"title":"approval_actionCreate"}}}}}
>
  
</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>


      