---
id: approval-cancel
title: Cancel a request
description: >-
  Cancels a request. Only a request that is `pending`, or that is approved
  (`approved` or `auto_approved`) and hasn't started executing, can be
  cancelled. A request that stayed `executing` for more than 60 seconds can be
  cancelled too.
sidebar_label: Cancel a request
hide_title: true
hide_table_of_contents: true
api: >-
  eJztWm1v2zgS/isEvzTBKY7z1t0V0A/BtkVz2G2LJN0uNi1imhxbbChSJam4PkP//TCkJEuym3jv9hY9oJ9iUSLnmeHMMzNkVlSA41YWXhpNU/oz0xyUI4xY+FyC8yPyRqvl+pn4jHkiHZkUoIXU80lCjG1HWVFYcw+C7E2anxN8P2GlN7ft0D5hWpCMOf3EE+eZ9SAIfAFeeqnnCeFMkyngHw5KgRiR8z4A59kSBJm0cyZkZizJjQX8QJOnY+KAGy3cxmLEGzP6oD/oqKySej7UbwrK6Lkj3hBGeAb8TknnCVPO1Os4Ir3rvLKlToJSvLvo3JqyqI3CFNlDjPCF5YWChDAioFBmmYP28cv9dnGfAakN3E53XWwITfqgxnUGxIIrjHaopbUS4gKNSmzmwYaRGhzD3U6DBhPnmS/dJGxpa6JJUCW8ry1s9G3zpQelHFlk4LPesoQzpaaM3xHLNNmbuJJzcG6yjw4wY1IFt4g/JvujD5om1BRgA5oLQVPaaJrGBWlCPZs7mt7Q8/oN/ZhQB7y00i9perOiU2AW7HnpM5refKw+JrRgluXgwbrwgUS3LpjPaEI1y4GmVAqaUMczyBlNV9QvizCqPczB0iqhaDhpQdDU2xKSQYygvS+eEzMLujeYRzSh9dbS9Oj45BSxNNviUM7xeIx/Nhdr9mnBXMflaUK50R60x1msKJTkwVSHnxxOXW2qYKafgHvaVeAmatugvGU87GUYBO2lX/Z+Bwu1T/Fj3CYr51IzdZt5X9zWeLvLDsYFaLk5Gh0o2KnvUzShpQMbkQiZg3bSaIebXVh0ES+jCaXYsmHD/TknpZafSyBSoB4zCTaQw8O7tYbwuIS+B+A8ssgMkVp6yZDKfNZyIVMtlXZlHp+cnlVb9+XPio8zIzd4K+dzsEM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skqCejkLjF3fPMYb5/Vt83AXVusM8P0q/vtV/N96FV+HhIcv/rBQTIaD/xBvqzpCb9bHTwlN5frQEFN/hrGc3tDVasocvLOqqnA4FvjpzUcss62MNH6zokI6/C1oOmPKDfmzGwd7l3XlsU++fvO+FXzT2mls7Ooin9KE3sEy/hdA9bFKaAZMgA2g4otzzqHwnSkbd+9IMS2JvX1zdR1PVbvMMmCSsPxWPKtV/OLa3IGuqhaex2dEWFX/BuYhisw=
sidebar_class_name: post api-method
info_path: docs/api/approval
custom_edit_url: null
canonical: 'https://docs.nullplatform.com/docs/api/approval-cancel'
---
<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Cancel a request"}
>
</Heading>

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

</MethodEndpoint>

Cancels a request. Only a request that is `pending`, or that is approved (`approved` or `auto_approved`) and hasn't started executing, can be cancelled. A request that stayed `executing` for more than 60 seconds can be cancelled too.

Cancelling a request that belongs to a checklist also cancels its checklist run, and cancelling a group approval (for example, a deployment group) cancels the pending approvals that belong to it.

The response carries the request after the cancellation: its `status` is `cancelled` and its `execution_status` tells whether the cancel callback ran (`success`) or failed (`failed`).

<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.","example":1234}]}
>

</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>

</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"The request was cancelled.","content":{"application/json":{"schema":{"type":"object","required":["id","approval_action_id","entity_id","entity_name","entity_action","original_http_request","approval_http_request","denial_http_request","status","execution_status","user_id","dimensions"],"properties":{"id":{"type":"integer","description":"A unique identifier for the approval.","example":1234},"user_id":{"type":"integer","description":"The ID of the user who initiated this approval request.","example":2345},"approval_action_id":{"type":"integer","description":"The ID of the action that triggered this approval.","example":3456},"entity_id":{"type":"string","description":"The ID of the entity affected by this approval.","example":"4567"},"aggregator_entity_id":{"type":"string","nullable":true,"description":"The ID of the group entity this approval belongs to, for example the deployment group of a deployment. Null when the approval doesn't belong to a group.","example":"9012"},"nrn":{"type":"string","description":"The NRN of the resource the approval applies to.","example":"organization=1:account=2:namespace=3:application=4:scope=5"},"entity_name":{"type":"string","description":"The entity that requires approval.","enum":["deployment","scope","service:action","parameter","action_item"],"example":"deployment","title":"entity_name"},"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":"entity_action"},"original_http_request":{"type":"object","description":"The HTTP request that triggered the approval."},"approval_http_request":{"type":"object","description":"The HTTP request that must be executed to approve the action."},"denial_http_request":{"type":"object","description":"The HTTP request that must be executed to deny the action."},"mode":{"type":"string","enum":["policy","checklist"],"nullable":true,"description":"How the approval is decided: by evaluating policies or by running a checklist.","example":"checklist"},"checklist_run_id":{"type":"string","nullable":true,"description":"The ID of the checklist run that decides the approval. Null in policy mode.","example":"crun_abc123def456ghij"},"created_at":{"type":"string","format":"date-time","description":"When the approval was created.","example":"2026-08-28T14:12:03.000Z"},"status":{"type":"string","description":"The current status of the approval request.","enum":["pending","approved","auto_approved","auto_denied","denied","cancelled","expired"],"example":"pending","title":"approval_status"},"execution_status":{"type":"string","description":"The execution state of the approval action.","enum":["pending","executing","success","failed","expired"],"example":"pending"},"dimensions":{"type":"object","example":{"environment":"production","country":"us"},"description":"The set of dimension/values pairs to which this action applies."}},"title":"approval"}}}},"400":{"description":"The request can't be cancelled: it expired, or its status is not `pending` or approved and waiting to execute."},"4XX":{"description":"The request couldn't be processed. For example, a parameter is invalid, the resource doesn't exist, or you don't have permission. The body is a problem details object (RFC 9457).","content":{"application/problem+json":{"schema":{"type":"object","description":"Describes what went wrong, following the RFC 9457 problem details format.","required":["type","title","status"],"properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem. It's an identifier, not a link, and it's the same every time this problem occurs.","example":"urn:nullplatform:error:routes-helper:invalid-params"},"title":{"type":"string","description":"A short, human-readable summary of the problem.","example":"There are invalid parameters on the request"},"status":{"type":"integer","description":"The HTTP status code of the response.","example":400},"code":{"type":"string","description":"A stable, machine-readable error code. Use it to handle specific errors in your integrations.","example":"ROUTES_HELPER.INVALID_PARAMS"},"detail":{"type":"string","nullable":true,"description":"More information about what went wrong in this request, when available.","example":null},"errors":{"type":"array","description":"One entry per invalid field or parameter. Only present on validation errors.","items":{"type":"object","properties":{"field":{"type":"string","description":"The name of the invalid field or parameter.","example":"application_id"},"in":{"type":"string","description":"Where the field was sent: `body`, `query`, or `params` (path parameters).","example":"query"},"issue":{"type":"string","description":"What's wrong with the field, such as `required` or `invalid`.","example":"invalid"},"value":{"description":"The value that was sent, when relevant.","example":"not-a-number"},"message":{"type":"string","description":"A human-readable explanation of the issue."}}}},"message":{"type":"string","deprecated":true,"description":"Same value as `title`, kept for backward compatibility. Use `title` or `code` instead.","example":"There are invalid parameters on the request"},"traceId":{"type":"string","description":"An identifier for this request, when available. Include it when you contact nullplatform support."}}}}}},"5XX":{"description":"Something went wrong on nullplatform's side. The body is a problem details object (RFC 9457).","content":{"application/problem+json":{"schema":{"type":"object","description":"Describes what went wrong, following the RFC 9457 problem details format.","required":["type","title","status"],"properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem. It's an identifier, not a link, and it's the same every time this problem occurs.","example":"about:blank"},"title":{"type":"string","description":"A short, human-readable summary of the problem.","example":"Oops.. there was an internal error"},"status":{"type":"integer","description":"The HTTP status code of the response.","example":500},"code":{"type":"string","description":"A stable, machine-readable error code. Use it to handle specific errors in your integrations."},"detail":{"type":"string","nullable":true,"description":"More information about what went wrong in this request, when available.","example":null},"message":{"type":"string","deprecated":true,"description":"Same value as `title`, kept for backward compatibility. Use `title` or `code` instead.","example":"Oops.. there was an internal error"},"traceId":{"type":"string","description":"An identifier for this request, when available. Include it when you contact nullplatform support."}}}}}}}}
>

</StatusCodes>

