---
id: workflow-execution-cancel
title: Cancel an execution
description: Cancels a running execution.
sidebar_label: Cancel an execution
hide_title: true
hide_table_of_contents: true
api: >-
  eJztWEtv2zgQ/isEL22x8qNtiha6pUGLzS7QDdIUKRAYyVgc2WwkUiVHdryG/vtiSFm2Y9UpFnvYQ3OJTHLImeH3zYNrSTDzMr2R19bd54VdCnzArCZtjZeTRCr0mdMV/5apPAOTYeEFCFcbo81su3ooE2krdMA/zpVM5bLdcdCtSbMgLxNZgYMSCR2fvZaaN6+A5jKRBkqUqdRKJtLh91o7VDIlV2MifTbHEmS6lrSqeJUnp81MNo8VvZrjVjWhFWuHD1BWBUvxzO27/DW8nL7KTtQblM0kHoae3lu14hMyawgN8SdUVaGzYNnom+cD1oeq2Ok3zIhtc+wH0uh51iG0Evsq7+rj6wqdR4VKTFcChMElOnaxbMJfIj1mtdO0Ct6aIjh0pzXNZXoziar7yhofT3w1HvO/Q4dE7xfBDrEELyDLsCIM3vmPzO2cHpZqCvZ96AaTA/HtFd/EO9/A5jwCYKF9FPQEVHuZSG2qmnwccYTqlLepKwXxe/JYJa2Oe78HDXtaHBVe5rc6v34/vc6rejY2LNrpvBXUhnCGblfydZNIKDT4TwHvx84o9CLoZN0MjP67Y1gPCzLrHMYb/hNXfds+InSh0dAgm1uPRtzjStQelSArCNwMSdAekZaa5sLrmYHCD/k8rbCsLKHJVr3nNd299Vlo6pKvvUKj4kgbVQIc2XhCBkEOuggfLYDDN+kS1a2tSU6aDhM98Ny397I2Iq4dijOHCg1pKAYccxSb7wU4FCX4e1TCGuEQVLTU1tR/RJPIBTgN0wL7Z9E563bp8Jmw+hAGj9MhswplIkv0HmZ4COwwfxQ5v19dXdy+GY9Zjc02/cGTQBf96jskt2Lrdman1hYIITyFWI6GOo73M2b/Gi4cejTEHvb1dLA8zD3B53FndtcP4F4igQLqiUvNbnjo0Se3rgSSqeSwMWAwscg2ivy0SAfUnxdip21Cb49TO2JwzptsMsDJ16+HUT3SVwSEDQXH+KlVK+Fh5cVyDiSWPL101sxSASYuFHd84F0iQMzrEsyAQc4XLO4iDnjKqIRvZwGFVjFhMAtrh57HUaAhtxIVOmHzPPJX5BqLY7mkcnZaYPlbT05pmXERV/Tw4jCbeQKjwKnWqGD488uPZ+Ltu/Fb0Z4lWmQnwqNboBLgxd2PdLp7MTzIZ1GPp/Ac2Cx4jfhyeZ4IHM6G4m5OVPl0NOoKIb/yhOVQ4WIUlPbbKWNpkNvaqLv9UuVf7cG4bF16LDp8siS69QdhuidnnYxPumDx1NaiI3VIGlqJR6lS4IP25EMWMXyZ2RPqdob6kcJcGx0CxagnA0fH7OwGzsHqWBTqwXn6NM41YdmbdPYxFArb46Z5wsqPfAZmlFmT69nRiL0rWtaexBwWKDapQ7Snr8QzzhDP2iIyRJE3fVHki8GHCjNCFVni2oDyi8m/mPyLyf9LJsfaZ265z66sD5oG3XZ9u62mRmutmlHXfUeWx9a7dsUOOKHSQ1MXRVUAcekyzGwZmuNNA/qZmR6dsduGdnbxRrJt1ENRExbJpP34uCmH/ri+kmwFs/Vy23h/2Hhj2zgf644ZcLnl1WxPxMLL4Xg4lh1t5Kcdc8TpxXkoLK2nEkLoap8b4stGqJF2mtU9lO08CTz1ENI6g/CBRlUBOqgaPL3B0E3XYfoAgu7NJZGp3vY6XPTP+X7TG7leT8HjF1c0DQ9/r9Hxe8Bk23+EC1Xa87eSaQ6FxyNGPL9scfZC9L2X9BqxoaFhEi6gqPmXTOQ9d3/cajfcjs0RFLqgTpw4i4cOrlh8K3jw0tAkG4nTUCAfXTvZIcHFX5+vGGXt400ZWiPpYMk9FSyjkraKPmZ08dhaFmBmdWCmjHuG2nwf0o8gHKzqdcN6HVdc2Xs0TdN5hfg3O6Zp/gER+sZO
sidebar_class_name: post api-method
info_path: docs/api/nullplatform-api
custom_edit_url: null
canonical: 'https://docs.nullplatform.com/docs/api/workflow-execution-cancel'
---
<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Cancel an execution"}
>
</Heading>

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

</MethodEndpoint>

Cancels a running execution.

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

<ParamsDetails
  parameters={[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"description":"The execution id.","example":"exec_8f3a1b2c4d5e"}]}
>

</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","example":"superseded by a newer run"}}}}}}}
>

</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"The cancellation was accepted.","content":{"application/json":{"schema":{"type":"object","properties":{"execution":{"title":"Execution","type":"object","required":["id","workflowId","revision","status","inputs","startedAt","updatedAt"],"properties":{"id":{"type":"string","example":"exec_8f3a1b2c4d5e"},"workflowId":{"type":"string","example":"wf_ifWBbWfpug0n"},"revision":{"type":"integer","example":3},"aliasName":{"type":"string","example":"live"},"organizationId":{"type":"string"},"correlationKey":{"type":"string","description":"Client-chosen key used to target the execution with signals."},"idempotencyKey":{"type":"string"},"status":{"type":"string","enum":["pending","running","completed","failed","cancelled","timed_out"]},"inputs":{"type":"object","description":"Run inputs. Credential-named keys are masked on reads."},"outputs":{"type":"object"},"variables":{"type":"object"},"error":{"title":"StepError","type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"HTTP_500"},"message":{"type":"string"},"details":{"type":"object"},"retryable":{"type":"boolean"}}},"parentExecutionId":{"type":"string","description":"Present on sub-workflow executions."},"parentStepId":{"type":"string"},"metadata":{"type":"object"},"startedAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"}}},"accepted":{"type":"boolean","enum":[true]}}}}}},"4XX":{"description":"Client error. The body says what went wrong: an error `type`, a human-readable `detail`, and, on validation failures, one entry per offending field.","content":{"application/problem+json":{"schema":{"title":"Problem","type":"object","description":"The standard error body (RFC 7807 problem details, served as `application/problem+json`).","properties":{"type":{"type":"string","description":"Error type URI, e.g. `https://workflow-system.dev/errors/workflow-not-found`.","example":"https://workflow-system.dev/errors/workflow-not-found"},"title":{"type":"string","example":"Not found"},"status":{"type":"integer","example":404},"detail":{"type":"string","example":"No workflow with id wf_ifWBbWfpug0n exists"},"instance":{"type":"string","example":"/workflows/definitions/wf_ifWBbWfpug0n"},"errors":{"type":"array","description":"Present on validation failures: one entry per offending field.","items":{"type":"object","properties":{"path":{"type":"string","example":"/steps/scan/config"},"message":{"type":"string","example":"must have required property 'code'"}}}}}}}}},"5XX":{"description":"Unexpected server error.","content":{"application/problem+json":{"schema":{"title":"Problem","type":"object","description":"The standard error body (RFC 7807 problem details, served as `application/problem+json`).","properties":{"type":{"type":"string","description":"Error type URI, e.g. `https://workflow-system.dev/errors/workflow-not-found`.","example":"https://workflow-system.dev/errors/workflow-not-found"},"title":{"type":"string","example":"Not found"},"status":{"type":"integer","example":404},"detail":{"type":"string","example":"No workflow with id wf_ifWBbWfpug0n exists"},"instance":{"type":"string","example":"/workflows/definitions/wf_ifWBbWfpug0n"},"errors":{"type":"array","description":"Present on validation failures: one entry per offending field.","items":{"type":"object","properties":{"path":{"type":"string","example":"/steps/scan/config"},"message":{"type":"string","example":"must have required property 'code'"}}}}}}}}}}}
>

</StatusCodes>

