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

This API stops a running workflow.

## Input parameters

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

## Sample request

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

## 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
