---
title: StopWorkflowRun
source: https://docs.newrelic.com/docs/workflow-automation/workflow-automation-apis/stop-workflow-run
---

Use the `workflowAutomationStopWorkflowRun` mutation to stop a running workflow.

## Input parameters [#input-parameters]

| Parameter   | Data type | Description                                                                                             |
| ----------- | --------- | ------------------------------------------------------------------------------------------------------- |
| `accountId` | Number    | (Required) Your account ID.                                                                             |
| `runId`     | String    | (Required) The unique identifier of the workflow run to stop. Obtained from the `StartWorkflowRun` API. |

## Sample request [#sample-request]

```graphql
mutation {
  workflowAutomationStopWorkflowRun(
    accountId: 12345678
    runId: "7ffbe082-8efa-4d3d-901a-a08bcf22bcd3"
  ) {
    runId
  }
}
```

## Sample response [#sample-response]

The mutation returns:

-   `runId`: The unique identifier of the stopped workflow run. Returns an empty `runId` if the workflow is not found.

## Related topics [#related-topics]

[Start workflow run](https://docs.newrelic.com/docs/workflow-automation/workflow-automation-apis/start-workflow-run)

Execute a workflow to get a runId

[Workflow run info](https://docs.newrelic.com/docs/workflow-automation/workflow-automation-apis/workflow-run-info)

Monitor workflow status before stopping

[Troubleshooting](https://docs.newrelic.com/docs/workflow-automation/troubleshooting)

Understand when to stop workflows
